#[repr(i32)]pub enum Signal {
Show 31 variants
SIGHUP = 1,
SIGINT = 2,
SIGQUIT = 3,
SIGILL = 4,
SIGTRAP = 5,
SIGABRT = 6,
SIGBUS = 7,
SIGFPE = 8,
SIGKILL = 9,
SIGUSR1 = 10,
SIGSEGV = 11,
SIGUSR2 = 12,
SIGPIPE = 13,
SIGALRM = 14,
SIGTERM = 15,
SIGSTKFLT = 16,
SIGCHLD = 17,
SIGCONT = 18,
SIGSTOP = 19,
SIGTSTP = 20,
SIGTTIN = 21,
SIGTTOU = 22,
SIGURG = 23,
SIGXCPU = 24,
SIGXFSZ = 25,
SIGVTALRM = 26,
SIGPROF = 27,
SIGWINCH = 28,
SIGIO = 29,
SIGPWR = 30,
SIGSYS = 31,
}Expand description
Enum representing the different interrupt signals
§Signals Supported
Not all signals are supported on all platforms/architectures. Which signals
does your platform support? Run: kill -l to find out!
- SIGHUP
- SIGINT
- SIGQUIT
- SIGILL
- SIGTRAP
- SIGABRT
- SIGBUS
- SIGFPE
- SIGKILL
- SIGUSR1
- SIGSEGV
- SIGUSR2
- SIGPIPE
- SIGALRM
- SIGTERM
- SIGSTKF
- SIGCHLD
- SIGCONT
- SIGSTOP
- SIGTSTP
- SIGTTIN
- SIGTTOU
- SIGURG
- SIGXCPU
- SIGXFSZ
- SIGVTAL
- SIGPROF
- SIGWINC
- SIGIO
- SIGPWR
- SIGSYS
- SIGEMT
- SIGINFO
Variants§
SIGHUP = 1
Hangup detected on controlling terminal or death of controlling process
SIGINT = 2
Interrupt from keyboard
SIGQUIT = 3
Quit from keyboard
SIGILL = 4
Illegal Instruction
SIGTRAP = 5
Trace/breakpoint trap
SIGABRT = 6
Abort signal from abort(3)
SIGBUS = 7
Bus error (bad memory access)
SIGFPE = 8
Floating-point exception
SIGKILL = 9
Kill signal
SIGUSR1 = 10
User-defined signal 1
SIGSEGV = 11
Invalid memory reference
SIGUSR2 = 12
User-defined signal 2
SIGPIPE = 13
Broken pipe: write to pipe with no readers
SIGALRM = 14
Timer signal from alarm(2)
SIGTERM = 15
Termination signal
SIGSTKFLT = 16
Stack fault on coprocessor.
SIGCHLD = 17
Child stopped or terminated
SIGCONT = 18
Continue if stopped
SIGSTOP = 19
Stop process
SIGTSTP = 20
Stop typed at terminal
SIGTTIN = 21
Terminal input for background process
SIGTTOU = 22
Terminal output for background process
SIGURG = 23
Urgent condition on socket (4.2BSD)
SIGXCPU = 24
CPU time limit exceeded (4.2BSD)
SIGXFSZ = 25
File size limit exceeded (4.2BSD)
SIGVTALRM = 26
Virtual alarm clock (4.2BSD)
SIGPROF = 27
Profiling timer expired
SIGWINCH = 28
Window resize signal (4.3BSD, Sun)
SIGIO = 29
I/O now possible (4.2BSD)
SIGPWR = 30
Power failure (System V)
SIGSYS = 31
Bad system call (SVr4)
Implementations§
Source§impl Signal
impl Signal
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
Returns name of signal.
This function is equivalent to <Signal as AsRef<str>>::as_ref(),
with difference that returned string is 'static
and not bound to self’s lifetime.
§Example
use addy::SIGINT;
fn main() {
println!("My favorite interrupt is: {}", SIGINT);
}