Bug#668416: killproc incorrect exit status
On tor, 2012-04-12 at 14:21 +0200, Didier 'OdyX' Raboud wrote:
> Le 11.04.2012 19:59, Peter Eisentraut a écrit :
> > Simple test:
> >
> > sudo bash
> > . /lib/lsb/init-functions
> > killproc /usr/bin/nonexistent
> > echo $?
> >
> > should print 0. It now prints 3.
>
> Attached is a proposed patch: as far as I can see, it does solve the
> problem pointed by this bugreport and does indeed work in the testcase
> you propose, but I'm not confident enough to claim it doesn't break
> anything else; would you mind to take a look?
Looks correct.
I wonder why it uses --oknodo in the else branch above (the $is_term_sig
case) and then checks for $status = 1 below, which cannot happen. But
that's probably unrelated.
Reply to: