aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/vfork_daemon_rexec.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libbb/vfork_daemon_rexec.c b/libbb/vfork_daemon_rexec.c
index c0bea0ed2..1aac27b36 100644
--- a/libbb/vfork_daemon_rexec.c
+++ b/libbb/vfork_daemon_rexec.c
@@ -292,14 +292,14 @@ void FAST_FUNC bb_daemonize_or_rexec(int flags, char **argv)
292 dup2(fd, 0); 292 dup2(fd, 0);
293 dup2(fd, 1); 293 dup2(fd, 1);
294 dup2(fd, 2); 294 dup2(fd, 2);
295 if (flags & DAEMON_DOUBLE_FORK) { 295// if (flags & DAEMON_DOUBLE_FORK) {
296 /* On Linux, session leader can acquire ctty 296// /* On Linux, session leader can acquire ctty
297 * unknowingly, by opening a tty. 297// * unknowingly, by opening a tty.
298 * Prevent this: stop being a session leader. 298// * Prevent this: stop being a session leader.
299 */ 299// */
300 if (fork_or_rexec(argv)) 300// if (fork_or_rexec(argv))
301 _exit(EXIT_SUCCESS); /* parent */ 301// _exit(EXIT_SUCCESS); /* parent */
302 } 302// }
303 } 303 }
304 while (fd > 2) { 304 while (fd > 2) {
305 close(fd--); 305 close(fd--);