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
pgpQWjDehyrnt.pgp
Description: PGP signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page