#signal-handler #stack #low-level #cooperative #occurs #called #true

signal-stack

Install signal handlers using a stack-based model for cooperative signal handling

1 unstable release

0.1.0 Jan 1, 2021

#9 in #cooperative


Used in grace

MIT/Apache

18KB
336 lines

signal-stack

Low-level library for installing signal handlers. Signal handlers are modelled as a stack: when a signal is raised, the stack is traversed from top to bottom, and each signal handler is called in turn.

A signal handler can return true to indicate that the signal was handled. In this case, no further handlers will be called. If no signal handler returns true then the default behaviour for that signal will occur.


lib.rs:

signal-stack

Low-level library for installing signal handlers. Signal handlers are modelled as a stack: when a signal is raised, the stack is traversed from top to bottom, and each signal handler is called in turn.

A signal handler can return true to indicate that the signal was handled. In this case, no further handlers will be called. If no signal handler returns true then the default behaviour for that signal will occur.

Dependencies

~0.6–1MB
~15K SLoC