Bug 1006 - Extend wait in killproc in /etc/rc.d/init.d/functions
Summary: Extend wait in killproc in /etc/rc.d/init.d/functions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 5.2
Hardware: i386
OS: Linux
low
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-01-31 17:19 UTC by kenn
Modified: 2014-03-17 02:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-02-05 17:34:00 UTC


Attachments (Terms of Use)

Description kenn 1999-01-31 17:19:21 UTC
--- 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 :-)

Comment 1 Bill Nottingham 1999-02-05 17:34:59 UTC
fixed in initscripts-3.84.


Note You need to log in before you can comment on or make changes to this bug.