Instead of killing the 'watchdog' subshell and leaving a sleep for

rcshutdown_timeout (normally 30s) around re-parented to init, make
sure both go away using pkill -P.

While noone normally notices this for the system shutdown, it helps for
cleanly shutting down trusted jails.
Found without a killall in the base system, which in rc.d/jail normally
ensures that all processes of a jail to be stopped will be killed.

Reviewed by:	silence on current@
MFC after:	4 weeks
This commit is contained in:
Bjoern A. Zeeb 2009-01-25 10:31:45 +00:00
parent 1cecba0fcd
commit 7bc5585ecb

View File

@ -98,7 +98,7 @@ done
# Terminate the background watchdog timer (if it is running)
#
if [ -n "$_rcshutdown_watchdog" ]; then
kill -TERM $_rcshutdown_watchdog >/dev/null 2>&1
pkill -TERM -P $_rcshutdown_watchdog >/dev/null 2>&1
fi
# Insert other shutdown procedures here