--- functions.dist Thu Oct 15 17:07:52 1998 +++ functions Fri Jan 29 02:28:29 1999 @@ -72,8 +72,11 @@ kill -TERM $pid usleep 100000 if ps h $pid >/dev/null 2>&1 ; then - sleep 3 - kill -KILL $pid + sleep 1 + if ps h $pid >/dev/null 2>&1 ; then + sleep 2 + kill -KILL $pid + fi fi # use specified level only else I have some daemons that take longer than 0.1sec to die after the SIGTERM. Rather than waiting for 3 secs and then either getting an error message "no such pid" from kill or going for the jugular, I suggest that we wait for one more second and check again. This way most killproc's take 0.1secs, some might take 1sec, and only rarely will it take 3 secs. It also reduces the number of unsightly 'no such pid' errors when shutting down. (I really hate seeing error messages, even if they are harmless :-)
fixed in initscripts-3.84.