From 39602b2002cf8b640226df767ee924a9d42a5c0f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 27 May 2003 16:25:04 +0000 Subject: [PATCH] Make _sure_ we don't go into an infinite loop if a signal happens! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6351 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Signals.cpp | 1 + support/lib/Support/Signals.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/Support/Signals.cpp b/lib/Support/Signals.cpp index 38fb9ddb811..503d3a63b29 100644 --- a/lib/Support/Signals.cpp +++ b/lib/Support/Signals.cpp @@ -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); } diff --git a/support/lib/Support/Signals.cpp b/support/lib/Support/Signals.cpp index 38fb9ddb811..503d3a63b29 100644 --- a/support/lib/Support/Signals.cpp +++ b/support/lib/Support/Signals.cpp @@ -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); } -- 2.50.1