[Supervisor-users] Child process get killed when killasgroup=false and stopasgroup=false

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Supervisor-users] Child process get killed when killasgroup=false and stopasgroup=false

Richard Gao
Hi list,
I start a process which has a child process. When I stop the process by **kill -9 pid**, the child process got killed too.

# CODE
import os
import sys
import time
import signal
import multiprocessing


def print_hi():
    print("### child process id: %s" % os.getpid())
    while True:
        print("hi world")
        sys.stdout.flush()
        time.sleep(5)

p = multiprocessing.Process(target=print_hi)
p.start()

while True:
    time.sleep(1)

# CONF

[program:test]
command=python /root/sleep.py
numprocs=1
directory=/root
user=root
autorestart=false
redirect_stderr=true
stdout_logfile=/root/supervisor/log/sleep.log
loglevel=info
killasgroup=false
stopasgroup=false

Thanks for any help.

_______________________________________________
Supervisor-users mailing list
[hidden email]
https://lists.supervisord.org/mailman/listinfo/supervisor-users