killproc bug or misfeature?

Alexander E. Patrakov patrakov at
Sun Oct 29 06:19:29 PST 2006


while attempting to adapt the pppoe service script from BLFS to the new 
instructions at, I found 
the following problem in the LFS bootscripts. The new script, in the 
"down" sections, attempts to call something like this:

killproc -p /var/run/ pppd

The intention is to get the pid from that file, send this process a 
SIGTERM signal, and wait until it goes away (this takes some time 
because the terminating LCP packets must be sent and acknowledged). All 
other instances of pppd should continue running.

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/ 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?

Alexander E. Patrakov

More information about the lfs-dev mailing list