]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Avoid piles of zombies
authorZack Cerza <zack@cerza.org>
Fri, 30 May 2014 14:59:36 +0000 (09:59 -0500)
committerZack Cerza <zack@cerza.org>
Fri, 30 May 2014 14:59:36 +0000 (09:59 -0500)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/worker.py

index 2e3891c4449ebfa8c0c3c639cb32e844066cefcb..baacd27b60fa6b331725884f87206cdc7e6c7cce 100644 (file)
@@ -2,6 +2,7 @@ import fcntl
 import logging
 import os
 import subprocess
+import signal
 import shutil
 import sys
 import tempfile
@@ -240,6 +241,9 @@ def main(ctx):
             # dies (e.g. because of a restart)
             result_pid = subprocess.Popen(args=args,
                                           preexec_fn=os.setpgrp,).pid
+            # Indicate that we don't care about collecting its return code, so
+            # it doesn't become a zombie. We can't have zombies piling up.
+            signal.signal(signal.SIGCHLD, signal.SIG_IGN)
             log.info("teuthology-results PID: %s", result_pid)
         else:
             log.info('Creating archive dir %s', archive_path_full)