diff options
author | sabetts <sabetts> | 2001-09-16 09:58:24 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2001-09-16 09:58:24 +0000 |
commit | 4b68178c380e2d3d9915bb2993b90cf5ab9c6be9 (patch) | |
tree | 046c34c166f0d7162945a53a71c78476af154787 /src | |
parent | bb0c4b008d37b49d76476aa79d1968f40c800e4a (diff) | |
download | ratpoison-4b68178c380e2d3d9915bb2993b90cf5ab9c6be9.zip |
* configure.in: check for setpgrp.
* src/actions.c (spawn): if setpgid doesn't exist, try setpgrp.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c index 41d0149..8468f16 100644 --- a/src/actions.c +++ b/src/actions.c @@ -864,9 +864,14 @@ spawn(void *data) /* Some process setup to make sure the spawned process runs in its own session. */ putenv(DisplayString(dpy)); +#ifdef HAVE_SETSID setsid(); +#endif +#if defined (HAVE_SETPGID) setpgid (0, 0); - +#elif defined (HAVE_SETPGRP) + setpgrp (0, 0); +#endif execl("/bin/sh", "sh", "-c", cmd, 0); _exit(EXIT_FAILURE); } |