summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/Unix/Signals.inc14
-rw-r--r--llvm/lib/Support/Windows/Signals.inc3
2 files changed, 1 insertions, 16 deletions
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc
index 5e0cde4a81e..be05eabfb2e 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -82,18 +82,12 @@ using namespace llvm;
static RETSIGTYPE SignalHandler(int Sig); // defined below.
static RETSIGTYPE InfoSignalHandler(int Sig); // defined below.
-static void DefaultPipeSignalFunction() {
- exit(EX_IOERR);
-}
-
using SignalHandlerFunctionType = void (*)();
/// The function to call if ctrl-c is pressed.
static std::atomic<SignalHandlerFunctionType> InterruptFunction =
ATOMIC_VAR_INIT(nullptr);
static std::atomic<SignalHandlerFunctionType> InfoSignalFunction =
ATOMIC_VAR_INIT(nullptr);
-static std::atomic<SignalHandlerFunctionType> PipeSignalFunction =
- ATOMIC_VAR_INIT(DefaultPipeSignalFunction);
namespace {
/// Signal-safe removal of files.
@@ -369,8 +363,7 @@ static RETSIGTYPE SignalHandler(int Sig) {
// Send a special return code that drivers can check for, from sysexits.h.
if (Sig == SIGPIPE)
- if (SignalHandlerFunctionType CurrentPipeFunction = PipeSignalFunction)
- CurrentPipeFunction();
+ exit(EX_IOERR);
raise(Sig); // Execute the default handler.
return;
@@ -410,11 +403,6 @@ void llvm::sys::SetInfoSignalFunction(void (*Handler)()) {
RegisterHandlers();
}
-void llvm::sys::SetPipeSignalFunction(void (*Handler)()) {
- PipeSignalFunction.exchange(Handler);
- RegisterHandlers();
-}
-
// The public API
bool llvm::sys::RemoveFileOnSignal(StringRef Filename,
std::string* ErrMsg) {
diff --git a/llvm/lib/Support/Windows/Signals.inc b/llvm/lib/Support/Windows/Signals.inc
index d962daf7934..6a820ef22b1 100644
--- a/llvm/lib/Support/Windows/Signals.inc
+++ b/llvm/lib/Support/Windows/Signals.inc
@@ -560,9 +560,6 @@ void llvm::sys::SetInfoSignalFunction(void (*Handler)()) {
// Unimplemented.
}
-void llvm::sys::SetPipeSignalFunction(void (*Handler)()) {
- // Unimplemented.
-}
/// Add a function to be called when a signal is delivered to the process. The
/// handler can have a cookie passed to it to identify what instance of the
OpenPOWER on IntegriCloud