aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-12-05 07:44:02 +0000
committerRon Yorston <rmy@pobox.com>2023-12-05 07:44:02 +0000
commit7dff7f37600209353cf4e86d1cca29bacf5f7372 (patch)
treefd2d62684e46663ebd435391058dcf8558c6b70d /include
parentf444dc586b16c104a82d201d3a7caca68affe51b (diff)
parent28f41260935852eda6bd8ab1f26347c012ae0a53 (diff)
downloadbusybox-w32-7dff7f37600209353cf4e86d1cca29bacf5f7372.tar.gz
busybox-w32-7dff7f37600209353cf4e86d1cca29bacf5f7372.tar.bz2
busybox-w32-7dff7f37600209353cf4e86d1cca29bacf5f7372.zip
Merge branch 'busybox' into mergeFRP-5236-g7dff7f376
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h
index bbb3108a9..0682e34ea 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1374,10 +1374,12 @@ void _exit_FAILURE(void) NORETURN FAST_FUNC;
1374 */ 1374 */
1375enum { 1375enum {
1376 DAEMON_CHDIR_ROOT = 1 << 0, 1376 DAEMON_CHDIR_ROOT = 1 << 0,
1377 DAEMON_DEVNULL_STDIO = 1 << 1, 1377 DAEMON_DEVNULL_STDIN = 1 << 1,
1378 DAEMON_CLOSE_EXTRA_FDS = 1 << 2, 1378 DAEMON_DEVNULL_OUTERR = 2 << 1,
1379 DAEMON_ONLY_SANITIZE = 1 << 3, /* internal use */ 1379 DAEMON_DEVNULL_STDIO = 3 << 1,
1380 //DAEMON_DOUBLE_FORK = 1 << 4, /* double fork to avoid controlling tty */ 1380 DAEMON_CLOSE_EXTRA_FDS = 1 << 3,
1381 DAEMON_ONLY_SANITIZE = 1 << 4, /* internal use */
1382 //DAEMON_DOUBLE_FORK = 1 << 5, /* double fork to avoid controlling tty */
1381}; 1383};
1382#if BB_MMU 1384#if BB_MMU
1383 enum { re_execed = 0 }; 1385 enum { re_execed = 0 };
@@ -1400,6 +1402,7 @@ enum {
1400# define bb_daemonize(a) BUG_bb_daemonize_is_unavailable_on_nommu() 1402# define bb_daemonize(a) BUG_bb_daemonize_is_unavailable_on_nommu()
1401#endif 1403#endif
1402void bb_daemonize_or_rexec(int flags, char **argv) FAST_FUNC; 1404void bb_daemonize_or_rexec(int flags, char **argv) FAST_FUNC;
1405/* Unlike bb_daemonize_or_rexec, these two helpers do not setsid: */
1403void bb_sanitize_stdio(void) FAST_FUNC; 1406void bb_sanitize_stdio(void) FAST_FUNC;
1404#define bb_daemon_helper(arg) bb_daemonize_or_rexec((arg) | DAEMON_ONLY_SANITIZE, NULL) 1407#define bb_daemon_helper(arg) bb_daemonize_or_rexec((arg) | DAEMON_ONLY_SANITIZE, NULL)
1405/* Clear dangerous stuff, set PATH. Return 1 if was run by different user. */ 1408/* Clear dangerous stuff, set PATH. Return 1 if was run by different user. */
@@ -1409,6 +1412,7 @@ int sanitize_env_if_suid(void) FAST_FUNC;
1409/* For top, ps. Some argv[i] are replaced by malloced "-opt" strings */ 1412/* For top, ps. Some argv[i] are replaced by malloced "-opt" strings */
1410void make_all_argv_opts(char **argv) FAST_FUNC; 1413void make_all_argv_opts(char **argv) FAST_FUNC;
1411char* single_argv(char **argv) FAST_FUNC; 1414char* single_argv(char **argv) FAST_FUNC;
1415char **skip_dash_dash(char **argv) FAST_FUNC;
1412extern const char *const bb_argv_dash[]; /* { "-", NULL } */ 1416extern const char *const bb_argv_dash[]; /* { "-", NULL } */
1413extern uint32_t option_mask32; 1417extern uint32_t option_mask32;
1414uint32_t getopt32(char **argv, const char *applet_opts, ...) FAST_FUNC; 1418uint32_t getopt32(char **argv, const char *applet_opts, ...) FAST_FUNC;