Avoid restarting a child when terminating
When sending a SIGTERM to the main glare-api process, it was sending a SIGTERM to its children but then also re-spawning its first dead child. Related-bug: #1714240 Change-Id: Ibef426c198d287bbdac4e764fd654edba4b7c2d7
This commit is contained in:
parent
e93e29bb50
commit
32b91f3a0e
@ -259,6 +259,7 @@ class Server(object):
|
||||
"""Kills the entire process group."""
|
||||
signal.signal(signal.SIGTERM, signal.SIG_IGN)
|
||||
signal.signal(signal.SIGINT, signal.SIG_IGN)
|
||||
signal.signal(signal.SIGCHLD, signal.SIG_IGN)
|
||||
self.running = False
|
||||
os.killpg(self.pgid, signal.SIGTERM)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user