Skip to content

std::os::signal

Status: experimental

POSIX-style signal subscription (Go's os/signal shape).

API details and source

The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.

Item Canonical signature or declaration Description
Notifier type Notifier Returned by on(sig); supports wait / try_wait.
Signal type Signal Opaque signal name; constructors live in sigs.
on fn on(signum: i64) -> os::signal::Notifier Subscribes to a signal; returns a Notifier.
try_wait fn try_wait(notifier: os::signal::Notifier) -> bool Non-blocking poll: returns true if the subscribed signal has fired.
wait fn wait(notifier: os::signal::Notifier) -> () Blocks the calling goroutine until the subscribed signal fires.