Signal transfer to controlled processes using a supervisor

I use supervisord to create and manage a FastCGI application that I write in C for target Linux. I have a signal handler that gracefully exits my application when I receive SIGINT. I checked that the signal handler works as desired by running the application in the terminal window and releasing Ctrl-C to exit.

When issuing the shutdown command to the supervisor (via supervisorctl), it seems that the supervisor cannot force the application to exit without calling SIGKILL:

2010-08-20 10:02:49,661 INFO waiting for cse to die
2010-08-20 10:02:52,665 INFO waiting for cse to die
2010-08-20 10:02:55,669 INFO waiting for cse to die
2010-08-20 10:02:58,672 INFO waiting for cse to die
2010-08-20 10:02:59,673 WARN killing 'cse' (2031) with SIGKILL
2010-08-20 10:02:59,674 INFO stopped: cse (terminated by SIGKILL)

I have the following in supervisord.conf

stopsignal=INT

This is my assumption that supervisord issues "stopignal" when the shutdown command is called, so I accept INFO instructions as an indication that my application does not respond to the SIGINT issued by the supervisor.

, ?

+3
3

, , , supervisord . , .

, , supervisord stderr , stopignal. stderr . , SIGINT, stderr .

+3

supervisord .

supervisord -n -e debug

+2

This was a bug that has since been fixed in Supervisor 3.0a10 (2011-03-30) according to this fix: https://github.com/Supervisor/supervisor/commit/e19cbc185dfad045c8775750d36ab8ceed4c4dfb

+2
source

Source: https://habr.com/ru/post/1760783/


All Articles