Bug 56174 - pidfileofproc in functions seems to be broken
pidfileofproc in functions seems to be broken
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-13 11:44 EST by Neil Bird
Modified: 2014-03-16 22:24 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-13 11:44:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Neil Bird 2001-11-13 11:44:03 EST
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 00:55:23 EST
Fixed in 6.51-1, thanks!

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