mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fixes #3163; cleanup child processes on kill
This commit is contained in:
parent
b8bf5950b6
commit
7f1ecdec8b
1 changed files with 9 additions and 7 deletions
|
|
@ -543,13 +543,15 @@ def main(argv=None):
|
|||
target=listen,
|
||||
args=(settings.get('BIND'), settings.get('PORT'),
|
||||
settings.get("OUTPUT_PATH"), excqueue))
|
||||
p1.start()
|
||||
p2.start()
|
||||
exc = excqueue.get()
|
||||
p1.terminate()
|
||||
p2.terminate()
|
||||
if exc is not None:
|
||||
logger.critical(exc)
|
||||
try:
|
||||
p1.start()
|
||||
p2.start()
|
||||
exc = excqueue.get()
|
||||
if exc is not None:
|
||||
logger.critical(exc)
|
||||
finally:
|
||||
p1.terminate()
|
||||
p2.terminate()
|
||||
elif args.autoreload:
|
||||
autoreload(args)
|
||||
elif args.listen:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue