Bug 314 - status function returns erroneous results
Summary: status function returns erroneous results
Status: CLOSED DUPLICATE of bug 281
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 5.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1998-12-06 04:06 UTC by Adam Thompson
Modified: 2014-03-17 02:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1998-12-06 20:52:27 UTC

Attachments (Terms of Use)

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 ***

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