Skip to content

Commit

Permalink
Init: Increase time till SIGKILL is sent
Browse files Browse the repository at this point in the history
When using killproc to kill a process, first a SIGTERM signal is sent,
and after a default of 3 seconds (5 seconds on suse), a SIGKILL is sent.

On larger setups we often see that 3 seconds, is not sufficient for
Naemon to shutdown, and as a result retention data might not be
correctly saved.

This commit increase the timeout to 90 seconds on rehat based releases
and on SUSE. This micics the behaviour of systemd.

This is part of MON-10565

Signed-off-by: Jacob Hansen <jhansen@op5.com>
  • Loading branch information
jacobbaungard committed Sep 4, 2018
1 parent 1b21757 commit 5d37d59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon-init.in
Expand Up @@ -96,9 +96,11 @@ start() {
stop() {
echo -n "Stopping $prog: "
if [ "x${is_suse}" == "xyes" ]; then
killproc -p ${pidfile} -t 10 $exec
killproc -p ${pidfile} -t 90 $exec
elif type start-stop-daemon >/dev/null 2>&1; then
start-stop-daemon --stop --name ${prog} --pidfile ${pidfile} --exec ${exec}
elif [ -e /etc/redhat-release ]; then
killproc -p ${pidfile} -d 90 ${exec}
else
killproc -p ${pidfile} ${exec}
fi
Expand Down

0 comments on commit 5d37d59

Please sign in to comment.