Bug 74848 - functions script incorrectly looks at base name for status checks
Summary: functions script incorrectly looks at base name for status checks
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 7.3
Hardware: i586 Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
Depends On:
TreeView+ depends on / blocked
Reported: 2002-10-02 06:08 UTC by Matt Vanecek
Modified: 2014-03-17 02:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-29 20:16:36 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Matt Vanecek 2002-10-02 06:08:42 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020916

Description of problem:
In the status() function of /etc/rc.d/init.d/functions, the base name of the
process is queried.  This is the first check to determine the status of a
process.  It does not account for the fact that unique applications may share
the same base name, and therefore incorrectly reports that a process is running
when it is not.

For example, /usr/libexec/postfix/master and /usr/cyrus/bin/master.  Cyrus will
fail to start every time because it starts after postfix, and functions.status()
tells the cyrus script that "master" is already running.

Since the various init scripts tap into RedHat's functions, the functions should
be more intelligent in situations like this.  Using the entire path works with
pidof, and it's reasonable to consider that init scripts would have and use the
correct path information (e.g., /usr/cyrus/bin/master).

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

How reproducible:

Steps to Reproduce:
1. Re-IPL
2. View boot sequence
3. Note that Postfix starts, and that later, cyrus does not start.  The cyrus
failure is directly attributable to the status received from functions.status(),
indicating "master" is already running.

Expected Results:  The correct results would be generated if functions.status()
used a "pidof /usr/cyrus/bin/master" instead of a "pidof /usr/cyrus/bin/master
|| pidof master".  This latter case will always be true if there is a different
application that has the same base name as one that is started later in the boot

Additional info:

Comment 1 Bill Nottingham 2005-09-29 20:16:36 UTC
Closing bugs on older, no longer supported, releases. Apologies for any lack of

If this persists on a current release, such as Fedora Core 4, please open a new bug.

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