Ubuntu 16.04
Python 3.8.1
killasgroup可以说是专门适配了Python的multiprocessing模块,如果配置了stopasgroup=true,那么killasgroup也会默认为true,所以我们只需要配置stopasgroup=true即可,注意stopasgroup和killasgroup发送的信号类型不同。
配置例子 :
[group:multiprocesstest]
programs=multiprocess
[program:multiprocess]
command=python3 /home/cox/work/test/multiprocess_suspend/multiprocess_suspend.py
directory=/home/cox
user=cox
autorestart=true
redirect_stderr=true
stopasgroup=true