summaryrefslogtreecommitdiff
path: root/openbox/action.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-12-22 18:37:12 +0000
committerDana Jansens <danakj@orodu.net>2003-12-22 18:37:12 +0000
commit745e851faa0a6f83858ef064ca589a33497e0b5a (patch)
tree83c117da9b6a53bfc1fa3fbbd61d31f55fca5dd0 /openbox/action.c
parent05c1f333238ba2eccf22f334072cb653c0d64957 (diff)
dont have glib reap children, we shall reap them instead to avoid zombies from processes tranferred to us
Diffstat (limited to 'openbox/action.c')
-rw-r--r--openbox/action.c13
1 files changed, 11 insertions, 2 deletions
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 {