HandleableSignalValidator¶
Validates that a signal number is handleable via the ASIO mechanism.
Only signals that can be safely caught and dispatched to Pony actors are accepted. Fatal signals (SIGILL, SIGTRAP, SIGABRT, SIGFPE, SIGBUS, SIGSEGV), uncatchable signals (SIGKILL, SIGSTOP), and unknown signal numbers are rejected. SIGUSR2 is handleable like any other signal; the runtime's scheduler no longer uses it, so the runtime reserves nothing.
Validation is necessary but not sufficient: the operating system can
still refuse a registration the whitelist admits (for example, glibc
reserves the two lowest real-time signals for its own threading
internals, and musl the three lowest). Such a refusal surfaces through
the normal failure path — the notify's registration_failed is called
and the handler is automatically disposed.
Diagnostic runtime builds (use=runtime_tracing) additionally reserve a
pause signal — SIGRTMIN on Linux, SIGINFO on BSD and macOS — and
handling that signal in such a build breaks runtime tracing.
Implements¶
Constructors¶
create¶
Returns¶
Public Functions¶
apply¶
Return ValidationSuccess for a handleable signal number, or a
ValidationFailure naming the rejected number.
Parameters¶
- sig: U32 val
Returns¶
eq¶
Parameters¶
- that: HandleableSignalValidator val
Returns¶
- Bool val
ne¶
Parameters¶
- that: HandleableSignalValidator val
Returns¶
- Bool val