Available on Windows and crate feature
signals only.Expand description
C signal support on Windows.
A big difference from POSIX platforms is the amount of signals that Windows supports. Signals on Windows are therefore much less useful than POSIX ones.
§Signal safe C functions
The C standard specifies that calling any functions other than those ones from a signal hook results in undefined behavior:
abort_Exitquick_exitsignal, but only if it is used for setting a handler for the same signal as the one being currently handled- atomic C functions, but only the ones which are lock-free (practically never used in Rust since it has its own atomics which use compiler intrinsics)
atomic_is_lock_free
Structs§
- NoReturn
Signal Hook - A function which can be used as a signal handler, but one which also never returns.
- Signal
Hook - A function which can be used as a signal handler.
- Unknown
Signal Error - Error type returned when a conversion from
i32/u32toSignalTypefails.
Enums§
- SetHandler
Error - The error produced when setting a signal handler fails.
- Signal
Handler - A signal handling method.
- Signal
Type - All standard signal types as defined in the C standard.
Functions§
- set_
handler - Installs the specified handler for the specified signal.
- set_
unsafe_ ⚠handler - Installs the specified handler for the specified unsafe signal.