diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-07-01 13:39:26 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-07-01 13:39:26 +0000 |
commit | 45f27583e2d6e4a9d8f491e6413ee39e3fa785fb (patch) | |
tree | 8551d4405ddb9bab894c523ecaca021555c123cc | |
parent | 60a978410f8c8e13ee130619cf5b0bb912d5d601 (diff) |
Merge MacOSX compat patch from Sebastien Estienne
git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@86 153bfa13-eec0-0310-be40-b0cb6a0e1b4b
-rw-r--r-- | libdaemon/dexec.c | 3 | ||||
-rw-r--r-- | libdaemon/dfork.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libdaemon/dexec.c b/libdaemon/dexec.c index e1d1910..b8f74c1 100644 --- a/libdaemon/dexec.c +++ b/libdaemon/dexec.c @@ -107,7 +107,8 @@ int daemon_exec(const char *dir, int *ret, const char *prog, ...) { FD_ZERO(&fds); FD_SET(p[0], &fds); - FD_SET(sigfd = daemon_signal_fd(), &fds); + sigfd = daemon_signal_fd(); + FD_SET(sigfd, &fds); n = 0; diff --git a/libdaemon/dfork.c b/libdaemon/dfork.c index 2fa9f30..c84cb58 100644 --- a/libdaemon/dfork.c +++ b/libdaemon/dfork.c @@ -209,7 +209,7 @@ pid_t daemon_fork(void) { signal(SIGTSTP, SIG_IGN); setsid(); - setpgrp(); + setpgid(0,0); if ((tty_fd = open("/dev/tty", O_RDWR)) >= 0) { ioctl(tty_fd, TIOCNOTTY, NULL); |