Platform Ctrl-C handling abstraction. Each platform can have its own implementation of these functions. More...
Typedefs | |
typedef void(* | PKCtrlCHandlerCallback) (void) |
Handler which is called when Ctrl-C has been signaled. | |
Functions | |
HqBool | PKSetCtrlCHandler (PKCtrlCHandlerCallback callback) |
Set the Ctrl-C function handler. More... | |
Platform Ctrl-C handling abstraction. Each platform can have its own implementation of these functions.
HqBool PKSetCtrlCHandler | ( | PKCtrlCHandlerCallback | callback | ) |
Set the Ctrl-C function handler.
This function removes any existing signal mask on SIGINT and SIGTERM previously performed using pthread_sigmask() within the calling thread. See HqCatchExceptions().
Typical RIP signal handling ought to be done as follows:
HqCatchExceptions() - block SIGCHLD, SIGINT and SIGTERM Start RIP - creates threads which inherit the signal mask Start all other threads - which continue to inherit the signal mask PKSetCtrlCHandler() - unblock SIGINT and SIGTERM so Ctrl-C handler can be invoked
[in] | callback | Function to be called when Ctrl-C has been signaled. |
TRUE
on success; FALSE
otherwise.