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
本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。