Bug 1071 - /etc/rc.d/init.d/functions: Function 'status' sometimes thinks a process is running when it isn't, because it finds the 'grep' in the process table.
Summary: /etc/rc.d/init.d/functions: Function 'status' sometimes thinks a process is r...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-02-08 13:43 UTC by David Woodhouse
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 1999-02-08 16:00:02 UTC
Embargoed:


Attachments (Terms of Use)

Description David Woodhouse 1999-02-08 13:43:34 UTC
The 'status' function in /etc/rc.d/init.d/functions
sometimes finds its own 'grep' in the process table, and
reports that a process is running when it in fact isn't.

Changing line 130 from
pid=`ps auxww | grep '[^[]'$1 | awk '{print $2}'`

 to

pid=`ps auxww | grep '[^[]'$1 | grep -v grep | awk '{print
$2}'`

serves as a temporary workaround here, but isn't ideal.

Comment 1 Bill Nottingham 1999-02-08 16:00:59 UTC
this has been fixed in a more recent version of initscripts.


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