diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-01-14 14:45:18 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-01-14 14:47:21 +0100 |
commit | 088fec36fedff2cd50437c95b7fb430abf8d303c (patch) | |
tree | f0dd190ed56fdf4b43710331e3527149903d87d2 /include | |
parent | b67d900395a847e29f2afa81198f783004c80fc5 (diff) | |
download | busybox-w32-088fec36fedff2cd50437c95b7fb430abf8d303c.tar.gz busybox-w32-088fec36fedff2cd50437c95b7fb430abf8d303c.tar.bz2 busybox-w32-088fec36fedff2cd50437c95b7fb430abf8d303c.zip |
start-stop-daemon: create pidfile before parent exits, closes 8596
This removes DAEMON_DOUBLE_FORK flag from bb_daemonize_or_rexec(),
as SSD was the only user.
Also includes fix for -S: now works without -a and -x,
does not print pids
(compat with "start-stop-daemon (OpenRC) 0.34.11 (Gentoo Linux)").
function old new delta
start_stop_daemon_main 1018 1084 +66
add_interface 99 103 +4
fail_hunk 139 136 -3
bb_daemonize_or_rexec 205 183 -22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 70/-25) Total: 45 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h index d2563999a..3366df30f 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1201,11 +1201,11 @@ void set_task_comm(const char *comm) FAST_FUNC; | |||
1201 | * to /dev/null if they are not. | 1201 | * to /dev/null if they are not. |
1202 | */ | 1202 | */ |
1203 | enum { | 1203 | enum { |
1204 | DAEMON_CHDIR_ROOT = 1, | 1204 | DAEMON_CHDIR_ROOT = 1 << 0, |
1205 | DAEMON_DEVNULL_STDIO = 2, | 1205 | DAEMON_DEVNULL_STDIO = 1 << 1, |
1206 | DAEMON_CLOSE_EXTRA_FDS = 4, | 1206 | DAEMON_CLOSE_EXTRA_FDS = 1 << 2, |
1207 | DAEMON_ONLY_SANITIZE = 8, /* internal use */ | 1207 | DAEMON_ONLY_SANITIZE = 1 << 3, /* internal use */ |
1208 | DAEMON_DOUBLE_FORK = 16, /* double fork to avoid controlling tty */ | 1208 | //DAEMON_DOUBLE_FORK = 1 << 4, /* double fork to avoid controlling tty */ |
1209 | }; | 1209 | }; |
1210 | #if BB_MMU | 1210 | #if BB_MMU |
1211 | enum { re_execed = 0 }; | 1211 | enum { re_execed = 0 }; |