Function
Sets a fatal signal handler for the current thread.
MLWORKS.Threads.Internal
MLWorks.Threads.Internal
val set_handler : (int -> unit) -> unit
set_handler f -> ()
int -> unit
.
()
Makes the user-defined function f the fatal signal handler for the current thread. When a fatal signal (that is, a SIGSEGV, SIGBUS, or SIGKILL signal) is sent to the current thread, f is executed prior to the thread's termination.
The integer argument passed to f is the number of the fatal signal.
Note: A thread handler is not inherited by the thread's children. Note also that the MLWorks.Threads.Internal.kill
function does not send a fatal signal.