Daemon-Control
Daemon-Control copied to clipboard
Status returns bad codes
$ sudo service httpd status
httpd is stopped
$ echo $?
3
$ sudo my_daemon status
my_daemon [Not Running]
$ echo $?
0
The exit cods for status should reflect the exit codes in the following documentation:
http://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
looks like it's trying to do the right thing here but some star or other is out of alignment.
So, it looks like it's been fixed here: https://github.com/jhard/Daemon-Control/commit/909a3424d72b4dac76797c0026c895f36ad5484a
And I've done the thing where I haven't shipped the changes to CPAN yet. Give me a few days, and I'll see about reviewing the other pull requests and cutting a new release.
Maybe worth having ->run_and_exit instead of ->run depending ?