Skip to main content

Signal

Enum Signal 

Source
#[repr(u8)]
pub enum Signal {
Show 31 variants Hangup = 0, Interrupt = 1, Quit = 2, IllegalInstruction = 3, Trap = 4, Abort = 5, BusError = 6, FloatingPointException = 7, Kill = 8, User1 = 9, SegmentationFault = 10, User2 = 11, BrokenPipe = 12, Alarm = 13, Termination = 14, StackFault = 15, Child = 16, Continue = 17, Stop = 18, TerminalStop = 19, TerminalInput = 20, TerminalOutput = 21, Urgent = 22, CpuTimeLimitExceeded = 23, FileSizeLimitExceeded = 24, VirtualAlarm = 25, ProfilingTimerExpired = 26, WindowResize = 27, IoPossible = 28, PowerFailure = 29, BadSystemCall = 30,
}
Expand description

POSIX signals enumeration

Variants§

§

Hangup = 0

Hangup detected on controlling terminal or death of controlling process (SIGHUP)

§

Interrupt = 1

Interrupt from keyboard (SIGINT)

§

Quit = 2

Quit from keyboard (SIGQUIT)

§

IllegalInstruction = 3

Unused : Illegal Instruction (SIGILL)

§

Trap = 4

Trace/breakpoint trap (SIGTRAP)

§

Abort = 5

Abort signal from abort(3) (SIGABRT)

§

BusError = 6

Bus error (bad memory access) (SIGBUS)

§

FloatingPointException = 7

Floating-point exception (SIGFPE)

§

Kill = 8

Kill signal (SIGKILL)

§

User1 = 9

User-defined signal 1 (SIGUSR1)

§

SegmentationFault = 10

Invalid memory reference (SIGSEGV)

§

User2 = 11

User-defined signal 2 (SIGUSR2)

§

BrokenPipe = 12

Broken pipe: write to pipe with no readers (SIGPIPE)

§

Alarm = 13

Timer signal from alarm(2) (SIGALRM)

§

Termination = 14

Termination signal (SIGTERM)

§

StackFault = 15

Stack fault on coprocessor (unused) (SIGSTKFLT)

§

Child = 16

Child stopped or terminated (SIGCHLD)

§

Continue = 17

Continue if stopped (SIGCONT)

§

Stop = 18

Stop process (SIGSTOP)

§

TerminalStop = 19

Stop typed at terminal (SIGTSTP)

§

TerminalInput = 20

Terminal input for background process (SIGTTIN)

§

TerminalOutput = 21

Terminal output for background process (SIGTTOU)

§

Urgent = 22

Urgent condition on socket (4.2BSD) (SIGURG)

§

CpuTimeLimitExceeded = 23

CPU time limit exceeded (4.2BSD) (SIGXCPU)

§

FileSizeLimitExceeded = 24

File size limit exceeded (4.2BSD) (SIGXFSZ)

§

VirtualAlarm = 25

Virtual alarm clock (4.2BSD) (SIGVTALRM)

§

ProfilingTimerExpired = 26

Profiling timer expired (SIGPROF)

§

WindowResize = 27

Window resize signal (4.3BSD, Sun) (SIGWINCH)

§

IoPossible = 28

I/O now possible (4.2BSD) (SIGIO)

§

PowerFailure = 29

Power failure (System V) (SIGPWR)

§

BadSystemCall = 30

Bad system call (SVr4) (SIGSYS)

Implementations§

Source§

impl Signal

Source

pub const FIRST: Self = Self::Hangup

Source

pub const LAST: Self = Self::BadSystemCall

Source

pub const fn get_discriminant(&self) -> u8

Trait Implementations§

Source§

impl Clone for Signal

Source§

fn clone(&self) -> Signal

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Signal

Source§

impl Debug for Signal

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Signal

Source§

impl PartialEq for Signal

Source§

fn eq(&self, other: &Signal) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Signal

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.