summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwevsty <11432483+wevsty@users.noreply.github.com>2020-02-25 11:23:42 +0800
committerGitHub <noreply@github.com>2020-02-25 10:23:42 +0700
commitdc299bc7ec0a60f95266320408ce20e85f1f6105 (patch)
tree1c75980e9b6c28ac8bd7bafd0c88e59320c59e39
parentbf93e11f2f98f526039f49341114b8c42fc05b17 (diff)
downloadrq-dc299bc7ec0a60f95266320408ce20e85f1f6105.tar.gz
fix kill_horse will cause zombie processes (#1194)
* fix kill_horse will cause zombie processes fix issue #1193 * Update tips message
-rw-r--r--rq/worker.py2
1 files changed, 2 insertions, 0 deletions
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