I tried to setup two processes in the same group but I can't seem to get
the behavior I expect/need. I made a simple test with these definitions:

; depend group
[group:netstat]
programs=ns1,ns2

; netstat 1
[program:ns1]
command=netstat -n -t 5
process_name=%(program_name)s
numprocs=1
priority=999
stopasgroup=true
autostart=true
autorestart=false
stopsignal=TERM
stopwaitsecs=10

; netstat 2
[program:ns2]
command=netstat -nlp -t 5
process_name=%(program_name)s
numprocs=1
priority=999
stopasgroup=true
autostart=true
autorestart=false
stopsignal=TERM
stopwaitsecs=10

The behavior that I want is that if either ns1 was to exit for any reason,
then the ns2 should exit as well. Likewise, if ns2 was to exit for any
reason, ns1 should also exit. The configuration I have above doesn't
achieve this, and I've played around with it some but nothing seems to
work. If I explicitly kill the ns1 netstat process with kill -TERM, the ns2
process continues to run. I've tried using various stop signals but the
results are always the same. What I need is for the processes in the same
group to *all* be sent stop signals if any process in the group exits for
*any* reason (either an explicit stop request, a crash, a kill, etc). Can
this be achieved with groups?

On Wed, Mar 13, 2013 at 6:01 AM, Peter Steele <[email protected]> wrote:

> I hadn't thought of using process groups since we don;'t use them at all.
> I'll have to investigate this. Thanks for the info...
>
>
_______________________________________________
Supervisor-users mailing list
[email protected]
https://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to