Bug 56174

Summary: pidfileofproc in functions seems to be broken
Product: [Retired] Red Hat Linux Reporter: Neil Bird <neil>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-11-13 16:44:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Neil Bird 2001-11-13 16:44:03 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)

Description of problem:
A segement of code appears to have been cut'n'paste from pidofproc into 
pidfileofproc (as used by the daemon function) - badly.

The following is in pidfileofproc:

if [ -f /var/run/${base}.pid ] ; then
    read pid < /var/run/${base}.pid
    for p in $line ; do


I think this should be:

if [ -f /var/run/${base}.pid ] ; then
    local line
    read line < /var/run/${base}.pid
    for p in $line ; do

  ... as it is below in pidofproc.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Look at /etc/rc.d/init.d/functions
2. Find pidfileofproc
3. Check it


Actual Results:  The init routine 'daemon' won't correctly check for 
running processes.


Expected Results:  It should.

Additional info:

I may bo completely wrong.  But if so, I really don't understand bash!

Comment 1 Bill Nottingham 2002-01-25 05:55:23 UTC
Fixed in 6.51-1, thanks!