Bug#668416: killproc incorrect exit status

Peter Eisentraut <[email protected]>
Newsgroups gmane.linux.debian.devel.lsb
Organization Debian
Message-ID <1334741590.29544.1.camel__25598.1647911996$1334741794$gmane$org@vanquo.pezone.net>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.