From: Didier Raboud Date: Wed, 7 Mar 2012 12:26:01 +0000 (+0100) Subject: In killproc(), re-add a '--retry 5' to s-s-d when no signal is specified. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~159^2~9 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=94e13e3eb4223a36273edd1717534fa5f7da8f0f;p=lsb.git In killproc(), re-add a '--retry 5' to s-s-d when no signal is specified. According to the letter of the LSB: killproc:"If a signal is specified, (...) the program is sent that signal. Otherwise, a SIGTERM followed by a SIGKILL after an unspecified number of seconds shall be sent." According to start-stop-daemon manpage, that's what `--retry 5` does, with `5 seconds` being the `unspecified` of LSB, hence the `--retry 5` is only added in the case where no signal is specified. Closes: #650584 Reported-by: Daniel Nelson Signed-off-by: Didier Raboud --- diff --git a/init-functions b/init-functions index d5b6971..da3ec18 100644 --- a/init-functions +++ b/init-functions @@ -137,7 +137,7 @@ killproc () { sig=$(echo ${2:-} | sed -e 's/^-\(.*\)/\1/') sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/') - if [ -z "$sig" ] || [ "$sig" = 15 ] || [ "$sig" = TERM ]; then + if [ "$sig" = 15 ] || [ "$sig" = TERM ]; then is_term_sig="terminate_signal" fi status=0 @@ -147,6 +147,7 @@ killproc () { --quiet $name_param || status="$?" else /sbin/start-stop-daemon --stop \ + --retry 5 \ --quiet $name_param || status="$?" fi else