diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h index 0883fb565..ef5d04713 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1309,10 +1309,12 @@ void _exit_FAILURE(void) NORETURN FAST_FUNC; | |||
1309 | */ | 1309 | */ |
1310 | enum { | 1310 | enum { |
1311 | DAEMON_CHDIR_ROOT = 1 << 0, | 1311 | DAEMON_CHDIR_ROOT = 1 << 0, |
1312 | DAEMON_DEVNULL_STDIO = 1 << 1, | 1312 | DAEMON_DEVNULL_STDIN = 1 << 1, |
1313 | DAEMON_CLOSE_EXTRA_FDS = 1 << 2, | 1313 | DAEMON_DEVNULL_OUTERR = 2 << 1, |
1314 | DAEMON_ONLY_SANITIZE = 1 << 3, /* internal use */ | 1314 | DAEMON_DEVNULL_STDIO = 3 << 1, |
1315 | //DAEMON_DOUBLE_FORK = 1 << 4, /* double fork to avoid controlling tty */ | 1315 | DAEMON_CLOSE_EXTRA_FDS = 1 << 3, |
1316 | DAEMON_ONLY_SANITIZE = 1 << 4, /* internal use */ | ||
1317 | //DAEMON_DOUBLE_FORK = 1 << 5, /* double fork to avoid controlling tty */ | ||
1316 | }; | 1318 | }; |
1317 | #if BB_MMU | 1319 | #if BB_MMU |
1318 | enum { re_execed = 0 }; | 1320 | enum { re_execed = 0 }; |
@@ -1335,6 +1337,7 @@ enum { | |||
1335 | # define bb_daemonize(a) BUG_bb_daemonize_is_unavailable_on_nommu() | 1337 | # define bb_daemonize(a) BUG_bb_daemonize_is_unavailable_on_nommu() |
1336 | #endif | 1338 | #endif |
1337 | void bb_daemonize_or_rexec(int flags, char **argv) FAST_FUNC; | 1339 | void bb_daemonize_or_rexec(int flags, char **argv) FAST_FUNC; |
1340 | /* Unlike bb_daemonize_or_rexec, these two helpers do not setsid: */ | ||
1338 | void bb_sanitize_stdio(void) FAST_FUNC; | 1341 | void bb_sanitize_stdio(void) FAST_FUNC; |
1339 | #define bb_daemon_helper(arg) bb_daemonize_or_rexec((arg) | DAEMON_ONLY_SANITIZE, NULL) | 1342 | #define bb_daemon_helper(arg) bb_daemonize_or_rexec((arg) | DAEMON_ONLY_SANITIZE, NULL) |
1340 | /* Clear dangerous stuff, set PATH. Return 1 if was run by different user. */ | 1343 | /* Clear dangerous stuff, set PATH. Return 1 if was run by different user. */ |