Skip to content

Commit

Permalink
use SIGKILL instead of SIGTERM (no difference on windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurin Schmidt committed Nov 12, 2024
1 parent ea70e83 commit a45d159
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py4web/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1715,11 +1715,11 @@ def kill_all(sig, _):
main_process = psutil.Process()
children = main_process.children(recursive=True)
for child in children:
child.terminate() # friendly termination
child.terminate() # friendly termination (SIGTERM)
_, still_alive = psutil.wait_procs(children, timeout=2)
for child in still_alive:
child.kill() # unfriendly termination
main_process.terminate()
child.kill() # unfriendly termination (SIGKILL)
main_process.kill() # SIGKILL

signal.signal(signal.SIGINT, kill_all)

Expand Down

0 comments on commit a45d159

Please sign in to comment.