Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 281 - init.d/functions status() grep for pid can fail
init.d/functions status() grep for pid can fail
Product: Red Hat Linux
Classification: Retired
Component: basesystem (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
: 314 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 1998-12-03 15:29 EST by bjn
Modified: 2014-03-16 22:08 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1998-12-21 12:29:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description bjn 1998-12-03 15:29:18 EST
The init.d functions script has a shell function called
status().  In the course of getting the status of a daemon
it must find its pid.

If pidof fails, it does a "ps | grep" to find it.  However,
the grep process itself shows up in the output.  This is
a common pitfall with this method; the usual remedy is to
add "| grep -v grep" in the pipeline to strip it out.

Patch en route.
Comment 1 David Lawrence 1998-12-03 15:59:59 EST
This bug has been assigned to a developer.
Comment 2 Bill Nottingham 1998-12-06 15:52:59 EST
*** Bug 314 has been marked as a duplicate of this bug. ***
Comment 3 Jeff Johnson 1998-12-21 12:29:59 EST
This has been fixed in a slightly different way in the
development version of initscripts.

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