NAME

unix::signal — Establish a signal handler.

synopsis

wyrm::unix::signal signal... script|ignore|default [ nochildstop|nochildwait|nodefer|onstack|restart|resethandler ] ...

description

Establish a signal handler. This interace does not provide a complete set of signal handling operations; the actual signal handling script is evaluated at some time after the signal handler has been called and returned. It is possible for many signal handlers to have been activated and old signal information overwritten before the handler script is actually evaluated. Any signal mask associated with the signal handler is no longer in effective at the time of evaluation.

When the script is evaluated, a number of key/value pairs are appended to the script before it is evaluated, including

number signal-number
signal signal-name
address event-address
pid child-pid
status child-status
uid child-uid
band poll-band
errno signal-errno
code signal-reason-code
The signal handler can be evaluated asynchrounously after any other command; if the script returns an okay result, the interrupted command result are returned. If the handler script returns an error, it replaces the interrupted handler result. Any other side effects, including changes to errorInfo and errorCode are not reversed after the handler.

SEE ALSO

unix-sigblock (1WY), unix-kill (1WY).

CAVEATS

Signal processing is not thread safe.