Bug 2407 - daemon() should check running processes against the given base
: daemon() should check running processes against the given base
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/initscripts)
: unstable
: all Linux
: P5 normal
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2003-03-23 01:58 by
Modified: 2003-08-25 15:18 (History)


Attachments


Note

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


Description From 2003-03-23 01:58:10
/etc/init.d/functions:

daemon() has a \'--check\' option. The function checks whether a process for this kind of daemon is already running.

I think it\'d be better if it checked running process against the argument of --check rather than the real program name:

--- /etc/init.d/functions.orig  2003-03-23 01:51:54 +0300
+++ /etc/init.d/functions       2003-03-23 01:50:23 +0300
@@ -137,7 +137,7 @@
        [ -n \"$gotbase\" ] || base=\"${1##*/}\"
 
        # See if it\'s already running.
-       local pidlist=`pidofproc \"$1\"`
+       local pidlist=`pidofproc \"$base\"`
 
        local pid= p
        for p in $pidlist; do

For example, the old variant made it difficult to start several PPP daemons from intiscripts. The new variant checks individual PIDs for different kinds of PPP daemons (the services have different names).

---

---
initscripts-5.49-ipl52mdk
------- Comment #1 From 2003-04-19 23:52:22 -------
Better fix in 5.49-ipl54mdk
------- Comment #2 From 2003-04-19 23:52:22 -------
Better fix in 5.49-ipl54mdk