[Lldb-commits] [PATCH] D13114: Check existence of SIGHUP before using it

Ying Chen via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 23 13:01:49 PDT 2015


chying created this revision.
chying added a reviewer: tfiala.
chying added a subscriber: lldb-commits.

-SIGHUP doesn't exist on Windows

http://reviews.llvm.org/D13114

Files:
  test/dosep.py

Index: test/dosep.py
===================================================================
--- test/dosep.py
+++ test/dosep.py
@@ -285,7 +285,8 @@
 
     # Shut off interrupt handling in the child process.
     signal.signal(signal.SIGINT, signal.SIG_IGN)
-    signal.signal(signal.SIGHUP, signal.SIG_IGN)
+    if hasattr(signal, 'SIGHUP'):
+        signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
     # Setup the global state for the worker process.
     setup_global_variables(
@@ -1268,7 +1269,8 @@
     """
 
     # Do not shut down on sighup.
-    signal.signal(signal.SIGHUP, signal.SIG_IGN)
+    if hasattr(signal, 'SIGHUP'):
+        signal.signal(signal.SIGHUP, signal.SIG_IGN)
 
     dotest_argv = sys.argv[1:]
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13114.35543.patch
Type: text/x-patch
Size: 721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150923/a35f9c65/attachment-0001.bin>


More information about the lldb-commits mailing list