Skip to content

HandleableSignalValidator

[Source]

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.

primitive val HandleableSignalValidator is
  Validator[U32 val] val

Implements


Constructors

create

[Source]

new val create()
: HandleableSignalValidator val^

Returns


Public Functions

apply

[Source]

Return ValidationSuccess for a handleable signal number, or a ValidationFailure naming the rejected number.

fun box apply(
  sig: U32 val)
: ValidationResult

Parameters

Returns


eq

[Source]

fun box eq(
  that: HandleableSignalValidator val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: HandleableSignalValidator val)
: Bool val

Parameters

Returns