Bug 1071

Summary: /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.
Product: [Retired] Red Hat Linux Reporter: David Woodhouse <dwmw2>
Component: initscriptsAssignee: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-02-08 16:00:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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}'`


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

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.