tags 653598 +pending +patch thanks Hi Peter, and thanks for your bugreport, and patch Le 29.12.2011 19:15, Peter Eisentraut a écrit : > 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. Agreed. I committed the attached patch, attributed to you (as it's not 100% the same patch, but equal in functionality and essence). I hope it's okay that way! Cheers, OdyX
Attachment:
signature.asc
Description: OpenPGP digital signature