Bug 134030

Summary: checkpid() in /etc/rc.d/init.d/functions has reserve logic
Product: Red Hat Enterprise Linux 3 Reporter: Kai-Min Sung <kai>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: 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: 2004-12-21 14:33:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 129244    
Attachments:
Description Flags
patch for /etc/rc.d/init.d/functions none

Description Kai-Min Sung 2004-09-29 02:02:06 UTC
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-29 02:06:26 UTC
Created attachment 104480 [details]
patch for /etc/rc.d/init.d/functions

Comment 2 John Flanagan 2004-12-21 14:33:03 UTC
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 15:35:58 UTC
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