X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Faction.c;h=2251715123aa5ba18aaeb1c0793c225472184a63;hb=2a8ede00043f4f5b64beffdc604e0f17d57d3eb8;hp=8eccb6b1416cae086914ac53157d9c6a3dab4fa0;hpb=b11a9484426b2bbdf05af39ca3103008665c2e8a;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index 8eccb6b1..22517151 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -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 {