killproc bug or misfeature?

Alex Merry alexander.merry at ccc.ox.ac.uk
Sun Oct 29 06:48:22 PST 2006


On Sunday 29 October 2006 14:19, Alexander E. Patrakov wrote:
> killproc -p /var/run/ppp-eth0.pid pppd
> [snip]
> However, the result is not as I expect. If there is indeed only one
> pppd, it is terminated, waited for, and a green OK appears on the
> screen. If there is another (unrelated) copy of pppd running, then
> the correct pppd (i.e., with the pid taken from
> /var/run/ppp-eth0.pid) is killed, but a red FAILED message appears on
> the screen. The other pppd continues running, exactly as I want.
> I.e., the only wrong thing above is the red FAILED message.
>
> Is this a bug, or am I abusing killproc for killing only some of the
> running instances of a daemon?

killproc does appear to assume that all running instances of a 
particular program will have been killed once a kill signal has been 
sent to the program in the pidfile (see lines 591 to 604 of functions).

Interestingly, if you specify a signal to be sent, it doesn't assume 
this (when it checks if the program has been killed, it passes the 
pidfile to pidofproc, which only checks pids found in the pidfile).  
This looks inconsistent to me, suggesting an unwarranted assumption has 
been made.

Alex :-)

-- 
Pippin
Computer Monkey to the Pelican
www.oxrev.org.uk, www.corpusjcr.org, www.rev.org.uk
0870 120 0870, ext 26669
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20061029/d6b11757/attachment.sig>


More information about the lfs-dev mailing list