Function EventDriverSignals.listen
Starts listening for the specified POSIX signal.
abstract SignalListenID listen
(
int sig,
nothrow @safe void delegate(SignalListenID, SignalStatus, int) on_signal
) nothrow @safe;
Note that if a default signal handler exists for the signal, it will be disabled by using this function.
Parameters
Name | Description |
---|---|
sig | The number of the signal to listen for |
on_signal | Callback that gets called whenever a matching signal gets received |
Returns
Returns an identifier that identifies the resource associated with
the signal. Giving up ownership of this resource using releaseRef
will re-enable the default signal handler, if any was present.
For any error condition, SignalListenID
will be returned
instead.