Package: lsb-base
Version: 3.2-28
Severity: normal

When a pid file is specified to status_of_proc with the -p option, but
it's not readable, then status_of_proc returns 3 (not running) instead
of 4 (unknown).  pidofproc handles this specially:

    if [ "$specified" ]; then
        return 3 # almost certain it's not running
    fi

but it's not clear why this is supposed to be different depending on
whether the pid file is implicit or explicit.

I suggest untangling this a bit and putting

    if [ -n "${pidfile:-}" ] && [ ! -r "$pidfile" ]; then
        return 4 # pid file not readable
    fi

near the top of pidofproc.  Then we also get the correct message from
status_of_proc.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to