From: Yaakov Selkowitz <[email protected]> "xoo --device FILENAME" must be a single string when passed to sh -c, otherwise the arguments are lost.
Also, use symbolic constant SIGKILL for portability. Signed-off-by: Yaakov Selkowitz <[email protected]> --- src/callbacks.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/callbacks.c b/src/callbacks.c index e46314e..9cbdeb8 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -140,6 +140,7 @@ on_select_device (GtkMenuItem * menuitem, FakeApp * app) if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) { + char cmd[PATH_MAX + 13]; char *filename; @@ -149,9 +150,10 @@ on_select_device (GtkMenuItem * menuitem, FakeApp * app) /* xxx FIXME, This is gross - just a very nasty hack for now xxx */ - kill (xnest_pid, 9); + kill (xnest_pid, SIGKILL); sleep (2); - execl ("/bin/sh", "sh", "-c", "xoo", "--device", filename, NULL); + sprintf (cmd, "xoo --device %s", filename); + execl ("/bin/sh", "sh", "-c", cmd, NULL); g_warning ("Failed load device %s\n", filename); -- 1.7.9 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
