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.
The runtime reserves a pause signal for tracing (SIGRTMIN on Linux, SIGINFO on BSD and macOS) and rejects it. On Linux, real-time signals 32 through 35 are also rejected because the C library and the runtime each claim signals in that range.
Validation is necessary but not sufficient: the operating system can
still refuse a registration the whitelist admits. Such a refusal
surfaces through the normal failure path — the notify's
registration_failed is called and the handler is automatically
disposed.
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