Bug 1006 - Extend wait in killproc in /etc/rc.d/init.d/functions
Extend wait in killproc in /etc/rc.d/init.d/functions
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
5.2
i386 Linux
low Severity low
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-01-31 12:19 EST by kenn
Modified: 2014-03-16 22:08 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-02-05 12:34:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description kenn 1999-01-31 12:19:21 EST
--- 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 12:34:59 EST
fixed in initscripts-3.84.

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