Bug 134030 - checkpid() in /etc/rc.d/init.d/functions has reserve logic
checkpid() in /etc/rc.d/init.d/functions has reserve logic
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: initscripts (Show other bugs)
3.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks: 129244
  Show dependency treegraph
 
Reported: 2004-09-28 22:02 EDT by Kai-Min Sung
Modified: 2014-03-16 22:48 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-21 09:33:03 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)
patch for /etc/rc.d/init.d/functions (1.04 KB, patch)
2004-09-28 22:06 EDT, Kai-Min Sung
no flags Details | Diff

  None (edit)
Description Kai-Min Sung 2004-09-28 22:02:06 EDT
Description of problem:
The checkpid() function in the file /etc/rc.d/init.d/function is used 
in killproc() to check the status of one or more PIDs. If checkpid() 
returns TRUE (or 0 in bash world), a TERM or KILL signal is sent to 
each of the PIDs. Currently, the function only returns TRUE if _all_ 
PIDs are still alive and returns FALSE (or 1) if at least one of the 
PIDs is dead. This logic is reversed. The function should return 0 if 
at least one of the PIDs is still alive, and return 1 otherwise.

On a side note, I would also suggest redirecting standard output and 
error to /dev/null when running kill in killproc(). It is possible 
the process has died in the meantime and the user will see a strange 
kill - "No such process" error.

Version-Release number of selected component (if applicable):
initscripts-7.31.13.EL-1

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Kai-Min Sung 2004-09-28 22:06:26 EDT
Created attachment 104480 [details]
patch for /etc/rc.d/init.d/functions
Comment 2 John Flanagan 2004-12-21 09:33:03 EST
An advisory has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-511.html
Comment 3 Tim Powers 2005-05-18 11:35:58 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-123.html

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