From dc299bc7ec0a60f95266320408ce20e85f1f6105 Mon Sep 17 00:00:00 2001 From: wevsty <11432483+wevsty@users.noreply.github.com> Date: Tue, 25 Feb 2020 11:23:42 +0800 Subject: [PATCH] fix kill_horse will cause zombie processes (#1194) * fix kill_horse will cause zombie processes fix issue #1193 * Update tips message --- rq/worker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rq/worker.py b/rq/worker.py index 789a2e8..edb3a03 100644 --- a/rq/worker.py +++ b/rq/worker.py @@ -376,6 +376,8 @@ class Worker(object): """ try: 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: if e.errno == errno.ESRCH: # "No such process" is fine with us