logos.std.os.unix.signal
Module std · package logos-std
Functions
fnblock
fn block(signum: i32) -> i32
Blocks delivery of signum in the current thread’s signal mask; returns 0 on success.
fnignore
fn ignore(signum: i32) -> void
Sets the disposition of signum to ignore (SIG_IGN).
fninstall
fn install(signum: i32, handler: *const u8) -> *const u8
Installs a signal handler for signum and returns the previous handler pointer.
handler must be a fn(i32) function pointer (cast via as *const u8), or the
SIG_DFL()/SIG_IGN() sentinels. Handlers run asynchronously: async-signal-safe code only.
fnraise_self
fn raise_self(signum: i32) -> i32
Sends signum to the calling thread via raise(2); returns 0 on success, nonzero on error.
fnreset_default
fn reset_default(signum: i32) -> void
Restores the default action (SIG_DFL) for signum.
fnschedule_alarm
fn schedule_alarm(seconds: u32) -> u32
Schedules a SIGALRM after seconds seconds; seconds == 0 cancels any pending alarm.
Returns seconds remaining on a previously scheduled alarm, or 0 if none.
fnsend_signal
fn send_signal(pid: i32, signum: i32) -> i32
Sends signum to process pid via kill(2); returns 0 on success, -1 on error.
fnSIG_BLOCK
fn SIG_BLOCK() -> i32
Returns the sigprocmask how value that adds the given set to the blocked mask.
fnSIG_DFL
fn SIG_DFL() -> i64
Returns the default-action handler sentinel; cast via as *const u8 for install.
fnSIG_IGN
fn SIG_IGN() -> i64
Returns the ignore-signal handler sentinel; cast via as *const u8 for install.
fnSIG_SETMASK
fn SIG_SETMASK() -> i32
Returns the sigprocmask how value that replaces the blocked mask with the given set.
fnSIG_UNBLOCK
fn SIG_UNBLOCK() -> i32
Returns the sigprocmask how value that removes the given set from the blocked mask.
fnSIGABRT
fn SIGABRT() -> i32
Returns the Linux SIGABRT signal number (abort).
fnSIGALRM
fn SIGALRM() -> i32
Returns the Linux SIGALRM signal number (timer set by schedule_alarm expired).
fnSIGCHLD
fn SIGCHLD() -> i32
Returns the Linux SIGCHLD signal number (child stopped or terminated).
fnSIGCONT
fn SIGCONT() -> i32
Returns the Linux SIGCONT signal number (continue if stopped).
fnSIGFPE
fn SIGFPE() -> i32
Returns the Linux SIGFPE signal number (erroneous arithmetic operation).
fnSIGHUP
fn SIGHUP() -> i32
Returns the Linux SIGHUP signal number (terminal hangup).
fnSIGILL
fn SIGILL() -> i32
Returns the Linux SIGILL signal number (illegal instruction).
fnSIGINT
fn SIGINT() -> i32
Returns the Linux SIGINT signal number (keyboard interrupt, Ctrl-C).
fnSIGKILL
fn SIGKILL() -> i32
Returns the Linux SIGKILL signal number (kill); cannot be caught, blocked, or ignored.
fnSIGPIPE
fn SIGPIPE() -> i32
Returns the Linux SIGPIPE signal number (write to a pipe with no readers).
fnSIGQUIT
fn SIGQUIT() -> i32
Returns the Linux SIGQUIT signal number (keyboard quit, Ctrl-).
fnSIGSEGV
fn SIGSEGV() -> i32
Returns the Linux SIGSEGV signal number (invalid memory reference).
fnSIGSTOP
fn SIGSTOP() -> i32
Returns the Linux SIGSTOP signal number (stop process); cannot be caught, blocked, or ignored.
fnSIGTERM
fn SIGTERM() -> i32
Returns the Linux SIGTERM signal number (termination request).
fnSIGUSR1
fn SIGUSR1() -> i32
Returns the Linux SIGUSR1 signal number (user-defined signal 1).
fnSIGUSR2
fn SIGUSR2() -> i32
Returns the Linux SIGUSR2 signal number (user-defined signal 2).
fnunblock
fn unblock(signum: i32) -> i32
Unblocks delivery of signum in the current thread’s signal mask; returns 0 on success.