alexsilva / supervisor

Supervisor process control system for Windows
http://supervisord.org
Other
122 stars 27 forks source link

What signals are supported? #22

Closed piertoni closed 4 years ago

piertoni commented 4 years ago

Hi, I have some problems to stop a process spawn by supervisor-win.

Is the option stopsignal supported? For what I can see only few signals seems to be accepted in the configuration using supervisorctl reread. Is there the possibiliti to perform a taskkill /F? Thanks

alexsilva commented 4 years ago

stopsignal is supported yes. the default is: stopsignal=TERM

All that are for windows only: https://docs.python.org/3/library/signal.html

taskkill /F works only for groups. A -> spawn -> B -> spawn -> C config: killasgroup or stopasgroup

This problem to stop the process appears to be recurring. I couldn't understand why it doesn't happen in my environment. If you can debug the problem we could solve it.

piertoni commented 4 years ago

killing the group does not work. I suspect all this can be caused by the "Terminate batch job (Y/N)" confirmation required if you run batch jobs. Maybe you don't have this issue because you are not starting through scripts? I tried for 2 hours to find a working trick to avoid the confirmation but yet did not found a working one.

alexsilva commented 4 years ago

Even with a .bat script running a sub-process, this failure does not occur.

@echo off
start "python" /B /W /HIGH python.exe %*

The TERM sign ends the process without any problems.

alexsilva commented 4 years ago

Do you have any updates on this ? Can you give me an example of reproducing this failure ?

alexsilva commented 4 years ago

Invest a lot of time correcting problems related to stopping processes. Follow the link: https://github.com/alexsilva/supervisor/issues/24

piertoni commented 4 years ago

No update at the moment, I cannot work on the problem. Close if you want to close.