]> Dogcows Code - chaz/openbox/blobdiff - openbox/action.c
dont have glib reap children, we shall reap them instead to avoid zombies from proces...
[chaz/openbox] / openbox / action.c
index 8eccb6b1416cae086914ac53157d9c6a3dab4fa0..2251715123aa5ba18aaeb1c0793c225472184a63 100644 (file)
@@ -979,14 +979,23 @@ void action_run_string(const gchar *name, struct _ObClient *c)
 void action_execute(union ActionData *data)
 {
     GError *e = NULL;
-    gchar *cmd;
+    gchar *cmd, **argv = 0;
     if (data->execute.path) {
         cmd = g_filename_from_utf8(data->execute.path, -1, NULL, NULL, NULL);
         if (cmd) {
-            if (!g_spawn_command_line_async(cmd, &e)) {
+            if (!g_shell_parse_argv (cmd, NULL, &argv, &e)) {
                 g_warning("failed to execute '%s': %s",
                           cmd, e->message);
                 g_error_free(e);
+            } else {
+                if (!g_spawn_async(NULL, argv, NULL, G_SPAWN_SEARCH_PATH |
+                                   G_SPAWN_DO_NOT_REAP_CHILD,
+                                   NULL, NULL, NULL, &e)) {
+                    g_warning("failed to execute '%s': %s",
+                              cmd, e->message);
+                    g_error_free(e);
+                }
+                g_strfreev(argv);
             }
             g_free(cmd);
         } else {
This page took 0.023335 seconds and 4 git commands to generate.