On Mon, Mar 21, 2011 at 12:27 PM, Chris McDonough <[email protected]> wrote:
> On Mon, 2011-03-21 at 12:20 -0500, Milan Andric wrote:
>> Hello folks, I'm new to the list and fairly new to supervisor.  I
>> really enjoy the tool and it provides a great way to manage processes.
>>  I have found one problem though, the supervisorctl program returns 0
>> on failure, is supervisor designed this way?
>>
>> bash$ supervisorctl -c /etc/supervisor/supervisord.conf restart fooblah
>> fooblah: ERROR (no such process)
>> fooblah: ERROR (no such process)
>> bash$ echo $?
>> 0
>>
>> This is somewhat strange to me and I am wondering if this is the
>> default behavior, or maybe I have configured something wrong.  This is
>> a problem for me because I would like to create a script that does
>> these supervisor calls and handles the case where a restart
>> fails/succeeds.  I appreciate your help, thanks.
>
> supervisorctl is used mostly as an interactive shell, and just grew some
> options to be used directly from the commandline.  It therefore doesn't
> know a one-shot failure to restart a single program should be translated
> into a special exit code.  No plans to make it do anything differently
> for now, so you might need to hack it yourself if you need the feature.
>
> - C
>

Thanks for the input Chris.  Would you recommend hacking supervisorctl
or just parsing the output from the shell? Or I guess is this
functionality something that supervisor users might want?

-M
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to