From 088fec36fedff2cd50437c95b7fb430abf8d303c Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 14 Jan 2019 14:45:18 +0100 Subject: 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 --- testsuite/start-stop-daemon.tests | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testsuite') diff --git a/testsuite/start-stop-daemon.tests b/testsuite/start-stop-daemon.tests index d07aeef0e..be1c1a856 100755 --- a/testsuite/start-stop-daemon.tests +++ b/testsuite/start-stop-daemon.tests @@ -16,4 +16,9 @@ testing "start-stop-daemon -a without -x" \ "1\n" \ "" "" +testing "start-stop-daemon without -x and -a" \ + 'start-stop-daemon -S false 2>&1; echo $?' \ + "1\n" \ + "" "" + exit $FAILCOUNT -- cgit v1.2.3