Avoid restarting a child when terminating
When sending a SIGTERM to the main glance-api process,
it was sending a SIGTERM to its children
but then also re-spawning its first dead child.
Closes-bug: #1714240
Change-Id: Ibef426c198d287bbdac4e764fd654edba4b7c2d6
(cherry picked from commit 877cd166b5
)
This commit is contained in:
parent
06af2eb5ab
commit
892af4718b
|
@ -491,6 +491,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