diff options
Diffstat (limited to 'llvm/lib/Support/Unix/Signals.inc')
-rw-r--r-- | llvm/lib/Support/Unix/Signals.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc index 8c26fa9b8f2..2b31672670c 100644 --- a/llvm/lib/Support/Unix/Signals.inc +++ b/llvm/lib/Support/Unix/Signals.inc @@ -361,16 +361,16 @@ static RETSIGTYPE SignalHandler(int Sig) { { RemoveFilesToRemove(); + if (Sig == SIGPIPE) + if (auto OldOneShotPipeFunction = + OneShotPipeSignalFunction.exchange(nullptr)) + return OldOneShotPipeFunction(); + if (std::find(std::begin(IntSigs), std::end(IntSigs), Sig) != std::end(IntSigs)) { if (auto OldInterruptFunction = InterruptFunction.exchange(nullptr)) return OldInterruptFunction(); - if (Sig == SIGPIPE) - if (auto OldOneShotPipeFunction = - OneShotPipeSignalFunction.exchange(nullptr)) - return OldOneShotPipeFunction(); - raise(Sig); // Execute the default handler. return; } |