Next Previous Up Top Contents Index

3.5 Threads: the Threads structure

set_handler

Function

Summary

Sets a fatal signal handler for the current thread.

Signature

MLWORKS.Threads.Internal 

Structure

MLWorks.Threads.Internal 

Type

val set_handler  : (int -> unit) -> unit

Syntax

set_handler f -> () 

Arguments

f
A function of type int -> unit.

Values

()

Description

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.

See also

reset_fatal_status, page 59.


MLWorks Reference Manual version 2.0 - 29 Jul 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker