diff options
author | Ron Yorston <rmy@pobox.com> | 2019-02-12 08:43:06 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-02-12 08:43:06 +0000 |
commit | 7a8bd5ae33d8c390763f0787afe6b8c495e2d978 (patch) | |
tree | 29b0abb320d73b37f4fa4d9b355b3b32db42e836 /libbb/vfork_daemon_rexec.c | |
parent | 0eda390d68c456975289471e68b615ae096ab33b (diff) | |
parent | f81e0120f4478c58e126bcadb19b9954ed184e8f (diff) | |
download | busybox-w32-7a8bd5ae33d8c390763f0787afe6b8c495e2d978.tar.gz busybox-w32-7a8bd5ae33d8c390763f0787afe6b8c495e2d978.tar.bz2 busybox-w32-7a8bd5ae33d8c390763f0787afe6b8c495e2d978.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'libbb/vfork_daemon_rexec.c')
-rw-r--r-- | libbb/vfork_daemon_rexec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c index 569a6fc34..2d497d754 100644 --- a/libbb/vfork_daemon_rexec.c +++ b/libbb/vfork_daemon_rexec.c | |||
@@ -297,14 +297,14 @@ void FAST_FUNC bb_daemonize_or_rexec(int flags, char **argv) | |||
297 | dup2(fd, 0); | 297 | dup2(fd, 0); |
298 | dup2(fd, 1); | 298 | dup2(fd, 1); |
299 | dup2(fd, 2); | 299 | dup2(fd, 2); |
300 | if (flags & DAEMON_DOUBLE_FORK) { | 300 | // if (flags & DAEMON_DOUBLE_FORK) { |
301 | /* On Linux, session leader can acquire ctty | 301 | // /* On Linux, session leader can acquire ctty |
302 | * unknowingly, by opening a tty. | 302 | // * unknowingly, by opening a tty. |
303 | * Prevent this: stop being a session leader. | 303 | // * Prevent this: stop being a session leader. |
304 | */ | 304 | // */ |
305 | if (fork_or_rexec(argv)) | 305 | // if (fork_or_rexec(argv)) |
306 | _exit(EXIT_SUCCESS); /* parent */ | 306 | // _exit(EXIT_SUCCESS); /* parent */ |
307 | } | 307 | // } |
308 | } | 308 | } |
309 | while (fd > 2) { | 309 | while (fd > 2) { |
310 | close(fd--); | 310 | close(fd--); |