aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-05-06 22:30:54 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2017-05-06 22:30:54 +0200
commit6a9383403c6ef34f32879896c2e60a45cc5dd7d8 (patch)
tree5a9a95e2d92856bfa8ffd506b9c17e10d4426ddd
parentba8657d8fef11d20d1b0c24cfc7f439aa2200797 (diff)
downloaddesktop-tools-6a9383403c6ef34f32879896c2e60a45cc5dd7d8.tar.gz
desktop-tools-6a9383403c6ef34f32879896c2e60a45cc5dd7d8.tar.xz
desktop-tools-6a9383403c6ef34f32879896c2e60a45cc5dd7d8.zip
wmstatus: don't try to spawn with setpgid(0, 0)
I cannot imagine a scenario where we want the child to be independent. It didn't work anyway because *instead* of the call we should have set a flag to call setpgid(), we were just reestablishing the defaults.
-rw-r--r--wmstatus.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/wmstatus.c b/wmstatus.c
index 8568ce3..cc1e318 100644
--- a/wmstatus.c
+++ b/wmstatus.c
@@ -2082,14 +2082,8 @@ spawn (char *argv[])
posix_spawn_file_actions_addopen
(&actions, STDOUT_FILENO, "/dev/null", O_WRONLY, 0);
- posix_spawnattr_t attr;
- posix_spawnattr_init (&attr);
- posix_spawnattr_setpgroup (&attr, 0);
-
- posix_spawnp (NULL, argv[0], &actions, &attr, argv, environ);
-
+ posix_spawnp (NULL, argv[0], &actions, NULL, argv, environ);
posix_spawn_file_actions_destroy (&actions);
- posix_spawnattr_destroy (&attr);
}
#define MPD_SIMPLE(name, ...) \