We override values from Core.Std.Signal
that we don't want people to use with
Async.
handle ?stop signals ~f
arranges so that whenever a signal in signals
is
delivered, f
is called on that signal. If f
raises, then an exception will be
raised to the monitor in effect when handle
was called.
Multiple calls to handle
with the same signal will cause all the handlers to run
when that signal is delivered, not just the last handler from the last call to
handle
.
The first time handle
is called for a signal, it will install a C signal handler for
that signal, which will replace the existing C signal handler for that signal.
terminating
is a list of signals that can be supplied to handle
and whose default
behavior is to terminate the program: alrm hup int term usr1 usr2.
Various signals whose default_sys_behavior
is `Terminate
are not included:
| kill | it's not allowed to be handled | | pipe | Async already ignores this signal, since it handles EPIPE | | prof | so that we can profile things with -p | | vtalrm | it already has a handler |