summaryrefslogtreecommitdiff
path: root/include/llvm/Support/Signals.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-10-23 17:51:42 +0000
commit1d5ae1026e831016fc29fd927877c86af904481f (patch)
tree2cdfd12620fcfa5d9e4a0389f85368e8e36f63f9 /include/llvm/Support/Signals.h
parente6d1592492a3a379186bfb02bd0f4eda0669c0d5 (diff)
Notes
Diffstat (limited to 'include/llvm/Support/Signals.h')
-rw-r--r--include/llvm/Support/Signals.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Support/Signals.h b/include/llvm/Support/Signals.h
index a6b215a24311..a4f1fad22dd5 100644
--- a/include/llvm/Support/Signals.h
+++ b/include/llvm/Support/Signals.h
@@ -84,6 +84,17 @@ namespace sys {
/// function. Note also that the handler may be executed on a different
/// thread on some platforms.
void SetInfoSignalFunction(void (*Handler)());
+
+ /// Registers a function to be called when a "pipe" signal is delivered to
+ /// the process.
+ ///
+ /// The "pipe" signal typically indicates a failed write to a pipe (SIGPIPE).
+ /// The default installed handler calls `exit(EX_IOERR)`, causing the process
+ /// to immediately exit with an IO error exit code.
+ ///
+ /// This function is only applicable on POSIX systems.
+ void SetPipeSignalFunction(void (*Handler)());
+
} // End sys namespace
} // End llvm namespace