From a8fe62ade4c9328c21ba9462be0230edd7f928ed Mon Sep 17 00:00:00 2001 From: egburr Date: Fri, 22 Nov 2024 15:21:29 -0500 Subject: [PATCH] Update joust.conf to kill all joust processes when a stop command is issued Change stopsignal to KILL from default TERM because python apparently ignores the TERM. This makes the stop immediate instead of delayed while supervisor waits on the TERM. Also, stopping/killing the entire process group (all the joust (pyparty processes) rather than just the parent process. Apparently a known issue with python, per the supervisor man page: "when resorting to send SIGKILL to the program to terminate it send it to its whole process group instead, taking care of its children as well, useful e.g with Python programs using multiprocessing." --- conf/supervisor/conf.d/joust.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/supervisor/conf.d/joust.conf b/conf/supervisor/conf.d/joust.conf index e4f60925..0ff7e885 100755 --- a/conf/supervisor/conf.d/joust.conf +++ b/conf/supervisor/conf.d/joust.conf @@ -3,5 +3,8 @@ command=/home/pi/JoustMania/joust.sh directory=/home/pi/JoustMania/ autorestart=true startretries=1000 +stopsignal=KILL +stopasgroup=true +killasgroup=true stderr_logfile=/var/log/joustmania-err.log stdout_logfile=/var/log/joustmania-out.log