killproc arguments

DJ Lucas dj at
Fri Jul 23 16:39:47 PDT 2004

Please forgive the threading.  I'm repling from the archives.

>> Right now we need to pass an argument to killproc else it errors.  If
>> PIDFILE is set, then there is no need, but optionally it could take a
>> signal.  Looking at my proposed patch (below), it may be better to
>> re-write the function completely and add a fallback variable ($2 and $3)
>> sometime in the future.
>> -- DJ Lucas
> I committed this, but I may change it around some more.
> there is a getpids $1 line, after it kills all the processes.  it will
> then make sure it has been terminated.  How would we preform the same
> check with the PIDFILE set?

if [ "$PIDFILE" != "" ]
     ps `cat $PIDFILE`
     if $? != 0....
     [insert current getpids $1 + rest here]

But actually, how many of the current bootscripts have signals set? 
Scripts that need them *could* explicitly set $signal and $fallback. 
This would make killproc a bit easier, and then just move the $PIDFILE 
check into getpids where it belongs anyway.  Finally, $1 is passed into 
getpids instead of killproc, only if $PIDFILE is not set.  I can't do it 
right now, but I'll take a peek at it a little later tonight and see if 
I can't put up a patch to look at. :-)

-- DJ Lucas

More information about the lfs-dev mailing list