Bug 56174 - pidfileofproc in functions seems to be broken
Summary: pidfileofproc in functions seems to be broken
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-13 16:44 UTC by Neil Bird
Modified: 2014-03-17 02:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-11-13 16:44:08 UTC
Embargoed:


Attachments (Terms of Use)

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!


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