Bug 2385 - The /etc/rc.d/functions daemon function used in rc files kills by process name, this causes problems
The /etc/rc.d/functions daemon function used in rc files kills by process nam...
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
5.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-04-27 13:27 EDT by bapper
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-07-06 15:10:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description bapper 1999-04-27 13:27:13 EDT
The daemon function should not kill processes based on the
name of the process.  The problem with this is that when
starting a daemon with the same name but different
parameters (in my case httpd), it does not function
properly.  The daemon function will kill the first process
it finds of that name, which may or may not be the right
one.  Instead of killing by process name, it would be better
to use pids or even the whole command line, not just the
process name.
Comment 1 Bill Nottingham 1999-04-27 14:02:59 EDT
- first of all, I'm assuming you mean killproc(). daemon() doesn't
kill anything.
- killproc() uses pidofproc, which first checks pid files,
and then ps, etc.

What are you trying to do that you need to specify some
but not all processes?- first of all, I'm assuming you mean killproc(). daemon() doesn't
kill anything.
- killproc() uses pidofproc, which first checks pid files,
and then ps, etc.

What are you trying to do that you need to specify some
but not all processes?
Comment 2 bapper 1999-04-27 16:12:59 EDT
Okay, I filled it out without rechecking what was going on.  The
problem I'm running into is with daemon not starting a process of the
same name.  I'm doing a project with 2 web server configurations and
if I use daemon, it returns imediately without launching the second
web server.  I save the pid of the second webserver to a different
file name (ie. httpd.internal.pid).  So the pidofproc() function will
eventually use ps to get the pid of the first webserver and daemon
will not launch the second.  The way debian does their
start-stop-daemon script is they allow you to specify a pidfile for
the daemon you are going to be starting.  This isn't a huge deal for
us because we can just start httpd however we want.  We just wanted to
do things the way Redhat does them because we are creating an add-on
to Redhat.  The ability to specify a pidfile would be a nice feature.

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