diff options
Diffstat (limited to 'include/llvm/Support/Signals.h')
-rw-r--r-- | include/llvm/Support/Signals.h | 11 |
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 |