Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1006

Summary: Extend wait in killproc in /etc/rc.d/init.d/functions
Product: [Retired] Red Hat Linux Reporter: kenn
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: kenn, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-02-05 17:34:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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.