summaryrefslogtreecommitdiffstats
path: root/libdaemon/dfork.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdaemon/dfork.c')
-rw-r--r--libdaemon/dfork.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdaemon/dfork.c b/libdaemon/dfork.c
index 263c6f5..19e02a0 100644
--- a/libdaemon/dfork.c
+++ b/libdaemon/dfork.c
@@ -210,12 +210,12 @@ pid_t daemon_fork(void) {
setsid();
setpgid(0,0);
-
+#ifdef TIOCNOTTY
if ((tty_fd = open("/dev/tty", O_RDWR)) >= 0) {
ioctl(tty_fd, TIOCNOTTY, NULL);
close(tty_fd);
}
-
+#endif
dpid = getpid();
if (atomic_write(pipe_fds[1], &dpid, sizeof(dpid)) != sizeof(dpid))
goto fail;