Module libc/signal

libc/signal
Stability: unstable — a raw C binding, not a Yo design, and currently unused: nothing in the tree imports it. Yo's signal handling is `std/signal` over `std/sys/signal` (`__yo_signal_start` / `__yo_signal_stop` / `__yo_kill` in the runtime), which delivers handler calls through the event loop instead of running C code in signal context; the `signal()` bound here has the historic C semantics (handler reset on delivery on some platforms, nothing async-signal-safe about a Yo closure) and is not a supported way to handle a signal in Yo. The signal NUMBERS are the useful part and they are per-platform. Use `std/signal`. — stable modules only change additively; this one may still change.

C11 <signal.h> — signal handling functions and constants.

Stability

unstable — a raw C binding, not a Yo design, and currently unused: nothing in the tree imports it. Yo's signal handling is std/signal over std/sys/signal (__yo_signal_start / __yo_signal_stop / __yo_kill in the runtime), which delivers handler calls through the event loop instead of running C code in signal context; the signal() bound here has the historic C semantics (handler reset on delivery on some platforms, nothing async-signal-safe about a Yo closure) and is not a supported way to handle a signal in Yo. The signal NUMBERS are the useful part and they are per-platform. Use std/signal.

Types

sig_atomic_t type-alias
sig_atomic_t

Functions

signal function
fn(sig : int, func : fn(signal_num : int) -> unit) -> fn(signal_num : int) -> unit

Parameters

NameTypeNotes
sigint
funcfn(signal_num : int) -> unit

Returns: fn(signal_num : int) -> unit

raise function
fn(sig : int) -> int

Parameters

NameTypeNotes
sigint

Returns: int

SIG_DFL function
fn(signal_num : int) -> unit

Parameters

NameTypeNotes
signal_numint

Returns: unit

SIG_IGN function
fn(signal_num : int) -> unit

Parameters

NameTypeNotes
signal_numint

Returns: unit

SIG_ERR function
fn(signal_num : int) -> unit

Parameters

NameTypeNotes
signal_numint

Returns: unit

Constants

SIGHUP constant int

Value: <unknown: int>

SIGINT constant int

Value: <unknown: int>

SIGQUIT constant int

Value: <unknown: int>

SIGILL constant int

Value: <unknown: int>

SIGTRAP constant int

Value: <unknown: int>

SIGABRT constant int

Value: <unknown: int>

SIGBUS constant int

Value: <unknown: int>

SIGFPE constant int

Value: <unknown: int>

SIGKILL constant int

Value: <unknown: int>

SIGUSR1 constant int

Value: <unknown: int>

SIGSEGV constant int

Value: <unknown: int>

SIGUSR2 constant int

Value: <unknown: int>

SIGPIPE constant int

Value: <unknown: int>

SIGALRM constant int

Value: <unknown: int>

SIGTERM constant int

Value: <unknown: int>

SIGCHLD constant int

Value: <unknown: int>

SIGCONT constant int

Value: <unknown: int>

SIGSTOP constant int

Value: <unknown: int>

SIGTSTP constant int

Value: <unknown: int>

SIGTTIN constant int

Value: <unknown: int>

SIGTTOU constant int

Value: <unknown: int>

SIGURG constant int

Value: <unknown: int>

SIGXCPU constant int

Value: <unknown: int>

SIGXFSZ constant int

Value: <unknown: int>

SIGVTALRM constant int

Value: <unknown: int>

SIGPROF constant int

Value: <unknown: int>

SIGWINCH constant int

Value: <unknown: int>

SIGIO constant int

Value: <unknown: int>

SIGPWR constant int

Value: <unknown: int>

SIGSYS constant int

Value: <unknown: int>