Bug 314

Summary: status function returns erroneous results
Product: [Retired] Red Hat Linux Reporter: Adam Thompson <athompso>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5.2CC: 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: 1998-12-06 20:52:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Adam Thompson 1998-12-06 04:06:09 UTC
the status() function in /etc/rc.d/init.d/functions
returns consistently erroneous results -- it always
indicates that the process in question is running.
This is due to a bug in the function - lines 129 through
134 duplicate functionality already contained in
pidofproc() at line 113, only incorrectly.  The grep
stage of the pipe picks up itself.  grep is started before
ps finishes executing - so something is always found - the
grep command itself!  Removing lines 129 through 134 causes
the behaviour to be correct again.  This could cause problems, as "subsystem dead but locked" will NEVER be returned as a status now - some things depend on that return value for correct functioning.  Typically, watchdog-type scripts break under this buggy behaviour.

Comment 1 Adam Thompson 1998-12-06 05:43:59 UTC
just reviewed RedHat's "Priority" levels -- this should be a "Normal"
severity, not "High", bug.  While it can cause disruption of service
(in the case where a watchdog relies upon the "status" function to
indicate a dead service), it does not cause system crashes or data
corruption.  Sorry for the inconvenience.

Comment 2 David Lawrence 1998-12-06 20:40:59 UTC
Have you been able to get any past installs to work from the tree you
have set up from different workstations?

Comment 3 David Lawrence 1998-12-06 20:41:59 UTC
Disregard last comment by me. I entered it on the wrong bug report.

Comment 4 Bill Nottingham 1998-12-06 20:52:59 UTC
*** This bug has been marked as a duplicate of 281 ***