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 0883fb5..ef5d047 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1309,10 +1309,12 @@ void _exit_FAILURE(void) NORETURN FAST_FUNC; */ enum { DAEMON_CHDIR_ROOT = 1 << 0, - DAEMON_DEVNULL_STDIO = 1 << 1, - DAEMON_CLOSE_EXTRA_FDS = 1 << 2, - DAEMON_ONLY_SANITIZE = 1 << 3, /* internal use */ - //DAEMON_DOUBLE_FORK = 1 << 4, /* double fork to avoid controlling tty */ + DAEMON_DEVNULL_STDIN = 1 << 1, + DAEMON_DEVNULL_OUTERR = 2 << 1, + DAEMON_DEVNULL_STDIO = 3 << 1, + DAEMON_CLOSE_EXTRA_FDS = 1 << 3, + DAEMON_ONLY_SANITIZE = 1 << 4, /* internal use */ + //DAEMON_DOUBLE_FORK = 1 << 5, /* double fork to avoid controlling tty */ }; #if BB_MMU enum { re_execed = 0 }; @@ -1335,6 +1337,7 @@ enum { # define bb_daemonize(a) BUG_bb_daemonize_is_unavailable_on_nommu() #endif void bb_daemonize_or_rexec(int flags, char **argv) FAST_FUNC; +/* Unlike bb_daemonize_or_rexec, these two helpers do not setsid: */ void bb_sanitize_stdio(void) FAST_FUNC; #define bb_daemon_helper(arg) bb_daemonize_or_rexec((arg) | DAEMON_ONLY_SANITIZE, NULL) /* Clear dangerous stuff, set PATH. Return 1 if was run by different user. */ |