EventDriverSignals.listen

Starts listening for the specified POSIX signal.

Note that if a default signal handler exists for the signal, it will be disabled by using this function.

interface EventDriverSignals
@safe nothrow
listen

Parameters

sig int

The number of the signal to listen for

on_signal SignalCallback

Callback that gets called whenever a matching signal gets received

Return Value

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.invalid will be returned instead.

Meta