From 26e84bcd52ad633c6b5261501f39cd225d84ef82 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 31 Oct 2007 04:09:32 -0700 Subject: [PATCH] fixed bug that prevented customized Applications menu items with arguments from working --- hw/darwin/apple/X11Controller.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/darwin/apple/X11Controller.m b/hw/darwin/apple/X11Controller.m index cc039b115..a6a75d0ab 100644 --- a/hw/darwin/apple/X11Controller.m +++ b/hw/darwin/apple/X11Controller.m @@ -296,15 +296,17 @@ - (void) launch_client:(NSString *)filename { const char *command = [filename UTF8String]; - const char *argv[5]; + const char *argv[7]; int child1, child2 = 0; int status; argv[0] = "/usr/bin/login"; argv[1] = "-fp"; argv[2] = getlogin(); - argv[3] = command; - argv[4] = NULL; + argv[3] = "/bin/sh"; + argv[4] = "-c"; + argv[5] = command; + argv[6] = NULL; /* Do the fork-twice trick to avoid having to reap zombies */