Module base::sys::unix::signal

source ·

Macros

ok_if 🔒
Treat some errno’s as Ok(()).

Structs

Wraps a Child process, and calls kill_tree for its process group to clean it up when dropped.

Enums

Constants

Traits

Trait for threads that can be signalled via pthread_kill.

Functions

Returns the maximum (inclusive) real-time signal number.
Returns the minimum (inclusive) real-time signal number.
Masks given signal.
Clears pending signal.
Resets the signal handler of signum num back to the default.
Creates sigset from an array of signal numbers.
Retrieves the signal mask of the current thread as a vector of c_ints.
Returns true if the signal handler for signum num is the default.
kill
Safety
Terminates and reaps a child process. If the child process is a group leader, its children will be terminated and reaped as well. After the given timeout, the child process and any relevant children are killed (i.e. sent SIGKILL).
Registers handler as the signal handler for the real-time signal with signum num.
Registers handler as the signal handler of signum num.
Unmasks given signal.
Wait for signal before continuing. The signal number of the consumed signal is returned on success. EAGAIN means the timeout was reached.

Type Definitions