Make _sure_ we don't go into an infinite loop if a signal happens!
authorChris Lattner <sabre@nondot.org>
Tue, 27 May 2003 16:25:04 +0000 (16:25 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 May 2003 16:25:04 +0000 (16:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6351 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Signals.cpp
support/lib/Support/Signals.cpp

index 38fb9ddb811447ebb18b330493fb323129ab5fb8..503d3a63b29886168c365ca666c073e2cf7ffd15 100644 (file)
@@ -42,6 +42,7 @@ static void SignalHandler(int Sig) {
     exit(1);   // If this is an interrupt signal, exit the program
 
   // Otherwise if it is a fault (like SEGV) reissue the signal to die...
+  signal(Sig, SIG_DFL);
 }
 
 static void RegisterHandler(int Signal) { signal(Signal, SignalHandler); }
index 38fb9ddb811447ebb18b330493fb323129ab5fb8..503d3a63b29886168c365ca666c073e2cf7ffd15 100644 (file)
@@ -42,6 +42,7 @@ static void SignalHandler(int Sig) {
     exit(1);   // If this is an interrupt signal, exit the program
 
   // Otherwise if it is a fault (like SEGV) reissue the signal to die...
+  signal(Sig, SIG_DFL);
 }
 
 static void RegisterHandler(int Signal) { signal(Signal, SignalHandler); }