[Lldb-commits] [lldb] r248141 - test framework: ignore sighups

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Sun Sep 20 22:42:28 PDT 2015

Author: tfiala
Date: Mon Sep 21 00:42:26 2015
New Revision: 248141

URL: http://llvm.org/viewvc/llvm-project?rev=248141&view=rev
test framework: ignore sighups

On OS X, we're occasionally seeing sighups come in to what
looks like the whole test runner process group (all the
multiprocessing workers and the main process).  It's not due
to a lost console.  This change has the main parallel test runner
process and the child worker processes ignore sighup.



Modified: lldb/trunk/test/dosep.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dosep.py?rev=248141&r1=248140&r2=248141&view=diff
--- lldb/trunk/test/dosep.py (original)
+++ lldb/trunk/test/dosep.py Mon Sep 21 00:42:26 2015
@@ -83,6 +83,7 @@ RESULTS_LISTENER_CHANNEL = None
    for the given thread/process calling it.  Returns a 0-based index."""
 def setup_global_variables(
         lock, counter, total, name_len, options, worker_index_map):
     global output_lock, test_counter, total_tests, test_name_len
@@ -277,6 +278,7 @@ def process_dir_worker_multiprocessing(
     # Shut off interrupt handling in the child process.
     signal.signal(signal.SIGINT, signal.SIG_IGN)
+    signal.signal(signal.SIGHUP, signal.SIG_IGN)
     # Setup the global state for the worker process.
@@ -1164,6 +1166,9 @@ def main(print_details_on_success, num_t
     test runner, which will forward them on to results_formatter.
+    # Do not shut down on sighup.
+    signal.signal(signal.SIGHUP, signal.SIG_IGN)
     dotest_argv = sys.argv[1:]
     global output_on_success, RESULTS_FORMATTER, output_lock

More information about the lldb-commits mailing list