Instead of falling through to RunSignalHandlers after the SIGPIPE
handler is uninstalled and we get a SIGPIPE, re-raise the signal, just
like we do for other IntSigs.
This was discussed and informally OK'd here:
https://reviews.llvm.org/rG9a3f892d018238dce5181e458905311db8e682f5#856804
OneShotPipeSignalFunction.exchange(nullptr))
return OldOneShotPipeFunction();
- if (llvm::is_contained(IntSigs, Sig)) {
+ bool IsIntSig = llvm::is_contained(IntSigs, Sig);
+ if (IsIntSig)
if (auto OldInterruptFunction = InterruptFunction.exchange(nullptr))
return OldInterruptFunction();
- raise(Sig); // Execute the default handler.
+ if (Sig == SIGPIPE || IsIntSig) {
+ raise(Sig); // Execute the default handler.
return;
- }
+ }
}
// Otherwise if it is a fault (like SEGV) run any handler.