Le 13 juil. 09 à 16:13, Mathieu Poumeyrol a écrit : > > Le 13 juil. 09 à 15:42, Charlie Brady a écrit : >> >> On Mon, 13 Jul 2009, Mathieu Poumeyrol wrote: >> >>> I have tracked down a bug in the lsb-compatible code for sv >>> status: sv return 0 even if the service is down. >> >> What makes you think that sv status should return non-zero if the >> service is down? I see nothing to suggest that here: >> >> http://smarden.sunsite.dk/runit/sv.8.html > > > It's not explicit here, but required for LSB compliance. > > see http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html > > As a matter of fact, sv code looks like it is meant to achieve this, > but fails because of the side effect on the "r" global. Sorry, it is actually explicit in the "Exit codes" last paragraph... If the command is status, it exits 3 if the service is down, and 4 if the status is unknown. It exits 2 on wrong usage, and 151 on error.