[FIX] server: graceful shutdown must send SIGINT instead of SIGTERM to workers

Workers do not specifically handle SIGTERM so it can be used to
force quit them, but the graceful shutdown is triggered by SIGINT.

Closes #6738
This commit is contained in:
Stéphane Bidoul 2015-05-16 14:13:39 +02:00 committed by Olivier Dony
parent e208fe51db
commit d291aba4b5
1 changed files with 1 additions and 1 deletions

View File

@ -613,7 +613,7 @@ class PreforkServer(CommonServer):
_logger.info("Stopping gracefully")
limit = time.time() + self.timeout
for pid in self.workers.keys():
self.worker_kill(pid, signal.SIGTERM)
self.worker_kill(pid, signal.SIGINT)
while self.workers and time.time() < limit:
self.process_zombie()
time.sleep(0.1)