Bug 74890 - daemon does not start when pid file mentions existing PID of other daemon
Summary: daemon does not start when pid file mentions existing PID of other daemon
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.3
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-02 16:41 UTC by Need Real Name
Modified: 2014-03-17 02:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-29 20:18:55 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2002-10-02 16:41:05 UTC
We have some boxes deployed into environments where monkeys sometimes unplug
them.  When the machine comes back up, sometimes apache doesn't start up because
the PID mentioned in its PID file refers to a live process from some other daemon.

I'm hoping that the functions (such as daemon) can be modified to avoid
triggering this error by checking the /proc/$PID/cmdline to see if it matches
the cmdname expected for that daemon.

initscripts-6.67-1

If you were willing to require perl, you could extract the command name with the
following code fragment: 

cmdname=`perl -e '$/ = "\0"; $_ = <STDIN>; chomp; s-.*/--; print "$_\n"' <
/proc/$PID/cmdline `

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

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.