Bug 134030 - checkpid() in /etc/rc.d/init.d/functions has reserve logic
Summary: checkpid() in /etc/rc.d/init.d/functions has reserve logic
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: initscripts
Version: 3.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 129244
TreeView+ depends on / blocked
 
Reported: 2004-09-29 02:02 UTC by Kai-Min Sung
Modified: 2014-03-17 02:48 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2004-12-21 14:33:03 UTC


Attachments (Terms of Use)
patch for /etc/rc.d/init.d/functions (1.04 KB, patch)
2004-09-29 02:06 UTC, Kai-Min Sung
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:511 normal SHIPPED_LIVE Updated initscripts package 2004-12-21 05:00:00 UTC
Red Hat Product Errata RHBA-2005:123 normal SHIPPED_LIVE initscripts bug fix update 2005-05-18 04:00:00 UTC

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



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