From 4b68178c380e2d3d9915bb2993b90cf5ab9c6be9 Mon Sep 17 00:00:00 2001 From: sabetts Date: Sun, 16 Sep 2001 09:58:24 +0000 Subject: * configure.in: check for setpgrp. * src/actions.c (spawn): if setpgid doesn't exist, try setpgrp. --- src/actions.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.3