Daemon-Control icon indicating copy to clipboard operation
Daemon-Control copied to clipboard

Status returns bad codes

Open symkat opened this issue 10 years ago • 3 comments

$ 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

symkat avatar Apr 13 '15 23:04 symkat

looks like it's trying to do the right thing here but some star or other is out of alignment.

dr-kd avatar Apr 13 '15 23:04 dr-kd

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.

symkat avatar Apr 13 '15 23:04 symkat

Maybe worth having ->run_and_exit instead of ->run depending ?

shadowcat-mst avatar Apr 14 '15 01:04 shadowcat-mst