fix kill_horse will cause zombie processes (#1194)

* fix kill_horse will cause zombie processes

fix issue #1193

* Update tips message
main
wevsty 5 years ago committed by GitHub
parent bf93e11f2f
commit dc299bc7ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -376,6 +376,8 @@ class Worker(object):
""" """
try: try:
os.kill(self.horse_pid, sig) os.kill(self.horse_pid, sig)
os.waitpid(self.horse_pid, 0)
self.log.info('Killed horse pid %s', self.horse_pid)
except OSError as e: except OSError as e:
if e.errno == errno.ESRCH: if e.errno == errno.ESRCH:
# "No such process" is fine with us # "No such process" is fine with us

Loading…
Cancel
Save