aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/System/Signals.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/System/Signals.h')
-rw-r--r--include/llvm/System/Signals.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/llvm/System/Signals.h b/include/llvm/System/Signals.h
index 197e4e1d2d..2b9d8ca6bf 100644
--- a/include/llvm/System/Signals.h
+++ b/include/llvm/System/Signals.h
@@ -25,17 +25,16 @@ namespace sys {
/// @brief Remove a file if a fatal signal occurs.
bool RemoveFileOnSignal(const Path &Filename, std::string* ErrMsg = 0);
- /// This function registers a signal handler to ensure that if a fatal signal
- /// gets delivered to the process that the named directory and all its
- /// contents are removed.
- /// @brief Remove a directory if a fatal signal occurs.
- bool RemoveDirectoryOnSignal(const Path& path, std::string* ErrMsg = 0);
-
/// When an error signal (such as SIBABRT or SIGSEGV) is delivered to the
/// process, print a stack trace and then exit.
/// @brief Print a stack trace if a fatal signal occurs.
void PrintStackTraceOnErrorSignal();
+ /// AddSignalHandler - Add a function to be called when an abort/kill signal
+ /// is delivered to the process. The handler can have a cookie passed to it
+ /// to identify what instance of the handler it is.
+ void AddSignalHandler(void (*FnPtr)(void *), void *Cookie);
+
/// This function registers a function to be called when the user "interrupts"
/// the program (typically by pressing ctrl-c). When the user interrupts the
/// program, the specified interrupt function is called instead of the program