Bug#668416: killproc incorrect exit status

Peter Eisentraut <[email protected]>
Newsgroups gmane.linux.debian.devel.lsb
Message-ID <20120411175914.27253.3264.reportbug__5326.3894435533$1334167239$gmane$org@vanquo.pezone.net>
Package: lsb-base
Version: 4.1+Debian0
Severity: normal

Somewhere between versions 3.2+Debian31 and 4.1+Debian0, the exit
status of the killproc function (/lib/lsb/init-functions) was changed
to return 3 when the program is not running.  This is only correct
when a signal was specified; see
<http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html>:

    If called without a signal, it shall return 0 if the program has
    been stopped or is not running and not 0 otherwise. If a signal is
    given, it shall return 0 only if the program is running.

This breaks init scripts that rely on this behavior; see for example
bug #667623.

Simple test:

    sudo bash
    . /lib/lsb/init-functions
    killproc /usr/bin/nonexistent
    echo $?

should print 0.  It now prints 3.
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.