Type SIG [src]
Signal types
Members
- ABRT (Constant)
- ABRT (Constant)
- ABRT (Constant)
- ABRT (Constant)
- ABRT (Constant)
- ABRT (Constant)
- ABRT (Constant)
- ABRT (Constant)
- ABRT (Constant)
- ABRT_COMPAT (Constant)
- ACK (Constant)
- ALRM (Constant)
- ALRM (Constant)
- ALRM (Constant)
- ALRM (Constant)
- ALRM (Constant)
- ALRM (Constant)
- ALRM (Constant)
- ALRM (Constant)
- BIT (Function)
- BIT (Function)
- BIT (Function)
- BLOCK (Constant)
- BLOCK (Constant)
- BLOCK (Constant)
- BLOCK (Constant)
- BLOCK (Constant)
- BLOCK (Constant)
- BREAK (Constant)
- BUS (Constant)
- BUS (Constant)
- BUS (Constant)
- BUS (Constant)
- BUS (Constant)
- BUS (Constant)
- BUS (Constant)
- BUS (Constant)
- CANCEL (Constant)
- CANCEL (Constant)
- CATCH (Constant)
- CHLD (Constant)
- CHLD (Constant)
- CHLD (Constant)
- CHLD (Constant)
- CHLD (Constant)
- CHLD (Constant)
- CHLD (Constant)
- CHLD (Constant)
- CKPT (Constant)
- CKPTEXIT (Constant)
- CLD (Constant)
- CONT (Constant)
- CONT (Constant)
- CONT (Constant)
- CONT (Constant)
- CONT (Constant)
- CONT (Constant)
- CONT (Constant)
- CONT (Constant)
- DFL (Constant)
- DFL (Constant)
- DFL (Constant)
- DFL (Constant)
- DFL (Constant)
- DFL (Constant)
- DFL (Constant)
- DFL (Constant)
- EMT (Constant)
- EMT (Constant)
- EMT (Constant)
- EMT (Constant)
- EMT (Constant)
- EMT (Constant)
- ERR (Constant)
- ERR (Constant)
- ERR (Constant)
- ERR (Constant)
- ERR (Constant)
- ERR (Constant)
- ERR (Constant)
- ERR (Constant)
- FPE (Constant)
- FPE (Constant)
- FPE (Constant)
- FPE (Constant)
- FPE (Constant)
- FPE (Constant)
- FPE (Constant)
- FPE (Constant)
- FPE (Constant)
- FREEZE (Constant)
- GET (Constant)
- HOLD (Constant)
- HOLD (Constant)
- HOLD (Constant)
- HOLD (Constant)
- HUP (Constant)
- HUP (Constant)
- HUP (Constant)
- HUP (Constant)
- HUP (Constant)
- HUP (Constant)
- HUP (Constant)
- HUP (Constant)
- IDX (Function)
- IDX (Function)
- IDX (Function)
- IGN (Constant)
- IGN (Constant)
- IGN (Constant)
- IGN (Constant)
- IGN (Constant)
- IGN (Constant)
- IGN (Constant)
- IGN (Constant)
- ILL (Constant)
- ILL (Constant)
- ILL (Constant)
- ILL (Constant)
- ILL (Constant)
- ILL (Constant)
- ILL (Constant)
- ILL (Constant)
- ILL (Constant)
- INFO (Constant)
- INFO (Constant)
- INFO (Constant)
- INFO (Constant)
- INFO (Constant)
- INFO (Constant)
- INFO (Constant)
- INT (Constant)
- INT (Constant)
- INT (Constant)
- INT (Constant)
- INT (Constant)
- INT (Constant)
- INT (Constant)
- INT (Constant)
- INT (Constant)
- INVAL (Constant)
- IO (Constant)
- IO (Constant)
- IO (Constant)
- IO (Constant)
- IO (Constant)
- IO (Constant)
- IO (Constant)
- IOT (Constant)
- IOT (Constant)
- IOT (Constant)
- IOT (Constant)
- IOT (Constant)
- IOT (Constant)
- IOT (Constant)
- JVM1 (Constant)
- JVM2 (Constant)
- KILL (Constant)
- KILL (Constant)
- KILL (Constant)
- KILL (Constant)
- KILL (Constant)
- KILL (Constant)
- KILL (Constant)
- KILL (Constant)
- KILLTHR (Constant)
- LIBRT (Constant)
- LOST (Constant)
- LWP (Constant)
- LWP (Constant)
- MAXSIG (Constant)
- MAXSIG (Constant)
- MAXSIG (Constant)
- PIPE (Constant)
- PIPE (Constant)
- PIPE (Constant)
- PIPE (Constant)
- PIPE (Constant)
- PIPE (Constant)
- PIPE (Constant)
- PIPE (Constant)
- POLL (Constant)
- POLL (Constant)
- POLL (Constant)
- PROF (Constant)
- PROF (Constant)
- PROF (Constant)
- PROF (Constant)
- PROF (Constant)
- PROF (Constant)
- PROF (Constant)
- PROF (Constant)
- PWR (Constant)
- PWR (Constant)
- PWR (Constant)
- QUIT (Constant)
- QUIT (Constant)
- QUIT (Constant)
- QUIT (Constant)
- QUIT (Constant)
- QUIT (Constant)
- QUIT (Constant)
- QUIT (Constant)
- RESERVED1 (Constant)
- RESERVED2 (Constant)
- RTMAX (Constant)
- RTMAX (Constant)
- RTMAX (Constant)
- RTMIN (Constant)
- RTMIN (Constant)
- RTMIN (Constant)
- SEGV (Constant)
- SEGV (Constant)
- SEGV (Constant)
- SEGV (Constant)
- SEGV (Constant)
- SEGV (Constant)
- SEGV (Constant)
- SEGV (Constant)
- SEGV (Constant)
- SETMASK (Constant)
- SETMASK (Constant)
- SETMASK (Constant)
- SETMASK (Constant)
- SETMASK (Constant)
- SETMASK (Constant)
- SGE (Constant)
- SIG_BLOCK (Constant)
- SIG_SETMASK (Constant)
- SIG_UNBLOCK (Constant)
- STKFLT (Constant)
- STOP (Constant)
- STOP (Constant)
- STOP (Constant)
- STOP (Constant)
- STOP (Constant)
- STOP (Constant)
- STOP (Constant)
- STOP (Constant)
- SYS (Constant)
- SYS (Constant)
- SYS (Constant)
- SYS (Constant)
- SYS (Constant)
- SYS (Constant)
- SYS (Constant)
- SYS (Constant)
- TERM (Constant)
- TERM (Constant)
- TERM (Constant)
- TERM (Constant)
- TERM (Constant)
- TERM (Constant)
- TERM (Constant)
- TERM (Constant)
- TERM (Constant)
- THAW (Constant)
- THR (Constant)
- THR (Constant)
- TRAP (Constant)
- TRAP (Constant)
- TRAP (Constant)
- TRAP (Constant)
- TRAP (Constant)
- TRAP (Constant)
- TRAP (Constant)
- TRAP (Constant)
- TSTP (Constant)
- TSTP (Constant)
- TSTP (Constant)
- TSTP (Constant)
- TSTP (Constant)
- TSTP (Constant)
- TSTP (Constant)
- TSTP (Constant)
- TTIN (Constant)
- TTIN (Constant)
- TTIN (Constant)
- TTIN (Constant)
- TTIN (Constant)
- TTIN (Constant)
- TTIN (Constant)
- TTIN (Constant)
- TTOU (Constant)
- TTOU (Constant)
- TTOU (Constant)
- TTOU (Constant)
- TTOU (Constant)
- TTOU (Constant)
- TTOU (Constant)
- TTOU (Constant)
- UNBLOCK (Constant)
- UNBLOCK (Constant)
- UNBLOCK (Constant)
- UNBLOCK (Constant)
- UNBLOCK (Constant)
- UNBLOCK (Constant)
- URG (Constant)
- URG (Constant)
- URG (Constant)
- URG (Constant)
- URG (Constant)
- URG (Constant)
- URG (Constant)
- URG (Constant)
- USR1 (Constant)
- USR1 (Constant)
- USR1 (Constant)
- USR1 (Constant)
- USR1 (Constant)
- USR1 (Constant)
- USR1 (Constant)
- USR1 (Constant)
- USR2 (Constant)
- USR2 (Constant)
- USR2 (Constant)
- USR2 (Constant)
- USR2 (Constant)
- USR2 (Constant)
- USR2 (Constant)
- USR2 (Constant)
- VALID (Function)
- VALID (Function)
- VALID (Function)
- VTALRM (Constant)
- VTALRM (Constant)
- VTALRM (Constant)
- VTALRM (Constant)
- VTALRM (Constant)
- VTALRM (Constant)
- VTALRM (Constant)
- VTALRM (Constant)
- WAITING (Constant)
- WINCH (Constant)
- WINCH (Constant)
- WINCH (Constant)
- WINCH (Constant)
- WINCH (Constant)
- WINCH (Constant)
- WINCH (Constant)
- WINCH (Constant)
- WORD (Function)
- WORD (Function)
- WORD (Function)
- WORDS (Constant)
- WORDS (Constant)
- WORDS (Constant)
- WORDS (Constant)
- XCPU (Constant)
- XCPU (Constant)
- XCPU (Constant)
- XCPU (Constant)
- XCPU (Constant)
- XCPU (Constant)
- XCPU (Constant)
- XCPU (Constant)
- XFSZ (Constant)
- XFSZ (Constant)
- XFSZ (Constant)
- XFSZ (Constant)
- XFSZ (Constant)
- XFSZ (Constant)
- XFSZ (Constant)
- XFSZ (Constant)
- XRES (Constant)
Source
pub const SIG = switch (native_os) {
.linux => linux.SIG,
.emscripten => emscripten.SIG,
.windows => struct {
/// interrupt
pub const INT = 2;
/// illegal instruction - invalid function image
pub const ILL = 4;
/// floating point exception
pub const FPE = 8;
/// segment violation
pub const SEGV = 11;
/// Software termination signal from kill
pub const TERM = 15;
/// Ctrl-Break sequence
pub const BREAK = 21;
/// abnormal termination triggered by abort call
pub const ABRT = 22;
/// SIGABRT compatible with other platforms, same as SIGABRT
pub const ABRT_COMPAT = 6;
// Signal action codes
/// default signal action
pub const DFL = 0;
/// ignore signal
pub const IGN = 1;
/// return current value
pub const GET = 2;
/// signal gets error
pub const SGE = 3;
/// acknowledge
pub const ACK = 4;
/// Signal error value (returned by signal call on error)
pub const ERR = -1;
},
.macos, .ios, .tvos, .watchos, .visionos => struct {
pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
pub const HOLD: ?Sigaction.handler_fn = @ptrFromInt(5);
/// block specified signal set
pub const BLOCK = 1;
/// unblock specified signal set
pub const UNBLOCK = 2;
/// set specified signal set
pub const SETMASK = 3;
/// hangup
pub const HUP = 1;
/// interrupt
pub const INT = 2;
/// quit
pub const QUIT = 3;
/// illegal instruction (not reset when caught)
pub const ILL = 4;
/// trace trap (not reset when caught)
pub const TRAP = 5;
/// abort()
pub const ABRT = 6;
/// pollable event ([XSR] generated, not supported)
pub const POLL = 7;
/// compatibility
pub const IOT = ABRT;
/// EMT instruction
pub const EMT = 7;
/// floating point exception
pub const FPE = 8;
/// kill (cannot be caught or ignored)
pub const KILL = 9;
/// bus error
pub const BUS = 10;
/// segmentation violation
pub const SEGV = 11;
/// bad argument to system call
pub const SYS = 12;
/// write on a pipe with no one to read it
pub const PIPE = 13;
/// alarm clock
pub const ALRM = 14;
/// software termination signal from kill
pub const TERM = 15;
/// urgent condition on IO channel
pub const URG = 16;
/// sendable stop signal not from tty
pub const STOP = 17;
/// stop signal from tty
pub const TSTP = 18;
/// continue a stopped process
pub const CONT = 19;
/// to parent on child stop or exit
pub const CHLD = 20;
/// to readers pgrp upon background tty read
pub const TTIN = 21;
/// like TTIN for output if (tp->t_local<OSTOP)
pub const TTOU = 22;
/// input/output possible signal
pub const IO = 23;
/// exceeded CPU time limit
pub const XCPU = 24;
/// exceeded file size limit
pub const XFSZ = 25;
/// virtual time alarm
pub const VTALRM = 26;
/// profiling time alarm
pub const PROF = 27;
/// window size changes
pub const WINCH = 28;
/// information request
pub const INFO = 29;
/// user defined signal 1
pub const USR1 = 30;
/// user defined signal 2
pub const USR2 = 31;
},
.freebsd => struct {
pub const HUP = 1;
pub const INT = 2;
pub const QUIT = 3;
pub const ILL = 4;
pub const TRAP = 5;
pub const ABRT = 6;
pub const IOT = ABRT;
pub const EMT = 7;
pub const FPE = 8;
pub const KILL = 9;
pub const BUS = 10;
pub const SEGV = 11;
pub const SYS = 12;
pub const PIPE = 13;
pub const ALRM = 14;
pub const TERM = 15;
pub const URG = 16;
pub const STOP = 17;
pub const TSTP = 18;
pub const CONT = 19;
pub const CHLD = 20;
pub const TTIN = 21;
pub const TTOU = 22;
pub const IO = 23;
pub const XCPU = 24;
pub const XFSZ = 25;
pub const VTALRM = 26;
pub const PROF = 27;
pub const WINCH = 28;
pub const INFO = 29;
pub const USR1 = 30;
pub const USR2 = 31;
pub const THR = 32;
pub const LWP = THR;
pub const LIBRT = 33;
pub const RTMIN = 65;
pub const RTMAX = 126;
pub const BLOCK = 1;
pub const UNBLOCK = 2;
pub const SETMASK = 3;
pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
pub const WORDS = 4;
pub const MAXSIG = 128;
pub inline fn IDX(sig: usize) usize {
return sig - 1;
}
pub inline fn WORD(sig: usize) usize {
return IDX(sig) >> 5;
}
pub inline fn BIT(sig: usize) usize {
return 1 << (IDX(sig) & 31);
}
pub inline fn VALID(sig: usize) usize {
return sig <= MAXSIG and sig > 0;
}
},
.solaris, .illumos => struct {
pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
pub const HOLD: ?Sigaction.handler_fn = @ptrFromInt(2);
pub const WORDS = 4;
pub const MAXSIG = 75;
pub const SIG_BLOCK = 1;
pub const SIG_UNBLOCK = 2;
pub const SIG_SETMASK = 3;
pub const HUP = 1;
pub const INT = 2;
pub const QUIT = 3;
pub const ILL = 4;
pub const TRAP = 5;
pub const IOT = 6;
pub const ABRT = 6;
pub const EMT = 7;
pub const FPE = 8;
pub const KILL = 9;
pub const BUS = 10;
pub const SEGV = 11;
pub const SYS = 12;
pub const PIPE = 13;
pub const ALRM = 14;
pub const TERM = 15;
pub const USR1 = 16;
pub const USR2 = 17;
pub const CLD = 18;
pub const CHLD = 18;
pub const PWR = 19;
pub const WINCH = 20;
pub const URG = 21;
pub const POLL = 22;
pub const IO = .POLL;
pub const STOP = 23;
pub const TSTP = 24;
pub const CONT = 25;
pub const TTIN = 26;
pub const TTOU = 27;
pub const VTALRM = 28;
pub const PROF = 29;
pub const XCPU = 30;
pub const XFSZ = 31;
pub const WAITING = 32;
pub const LWP = 33;
pub const FREEZE = 34;
pub const THAW = 35;
pub const CANCEL = 36;
pub const LOST = 37;
pub const XRES = 38;
pub const JVM1 = 39;
pub const JVM2 = 40;
pub const INFO = 41;
pub const RTMIN = 42;
pub const RTMAX = 74;
pub inline fn IDX(sig: usize) usize {
return sig - 1;
}
pub inline fn WORD(sig: usize) usize {
return IDX(sig) >> 5;
}
pub inline fn BIT(sig: usize) usize {
return 1 << (IDX(sig) & 31);
}
pub inline fn VALID(sig: usize) usize {
return sig <= MAXSIG and sig > 0;
}
},
.netbsd => struct {
pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
pub const WORDS = 4;
pub const MAXSIG = 128;
pub const BLOCK = 1;
pub const UNBLOCK = 2;
pub const SETMASK = 3;
pub const HUP = 1;
pub const INT = 2;
pub const QUIT = 3;
pub const ILL = 4;
pub const TRAP = 5;
pub const ABRT = 6;
pub const IOT = ABRT;
pub const EMT = 7;
pub const FPE = 8;
pub const KILL = 9;
pub const BUS = 10;
pub const SEGV = 11;
pub const SYS = 12;
pub const PIPE = 13;
pub const ALRM = 14;
pub const TERM = 15;
pub const URG = 16;
pub const STOP = 17;
pub const TSTP = 18;
pub const CONT = 19;
pub const CHLD = 20;
pub const TTIN = 21;
pub const TTOU = 22;
pub const IO = 23;
pub const XCPU = 24;
pub const XFSZ = 25;
pub const VTALRM = 26;
pub const PROF = 27;
pub const WINCH = 28;
pub const INFO = 29;
pub const USR1 = 30;
pub const USR2 = 31;
pub const PWR = 32;
pub const RTMIN = 33;
pub const RTMAX = 63;
pub inline fn IDX(sig: usize) usize {
return sig - 1;
}
pub inline fn WORD(sig: usize) usize {
return IDX(sig) >> 5;
}
pub inline fn BIT(sig: usize) usize {
return 1 << (IDX(sig) & 31);
}
pub inline fn VALID(sig: usize) usize {
return sig <= MAXSIG and sig > 0;
}
},
.dragonfly => struct {
pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
pub const BLOCK = 1;
pub const UNBLOCK = 2;
pub const SETMASK = 3;
pub const IOT = ABRT;
pub const HUP = 1;
pub const INT = 2;
pub const QUIT = 3;
pub const ILL = 4;
pub const TRAP = 5;
pub const ABRT = 6;
pub const EMT = 7;
pub const FPE = 8;
pub const KILL = 9;
pub const BUS = 10;
pub const SEGV = 11;
pub const SYS = 12;
pub const PIPE = 13;
pub const ALRM = 14;
pub const TERM = 15;
pub const URG = 16;
pub const STOP = 17;
pub const TSTP = 18;
pub const CONT = 19;
pub const CHLD = 20;
pub const TTIN = 21;
pub const TTOU = 22;
pub const IO = 23;
pub const XCPU = 24;
pub const XFSZ = 25;
pub const VTALRM = 26;
pub const PROF = 27;
pub const WINCH = 28;
pub const INFO = 29;
pub const USR1 = 30;
pub const USR2 = 31;
pub const THR = 32;
pub const CKPT = 33;
pub const CKPTEXIT = 34;
pub const WORDS = 4;
},
.haiku => struct {
pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
pub const HOLD: ?Sigaction.handler_fn = @ptrFromInt(3);
pub const HUP = 1;
pub const INT = 2;
pub const QUIT = 3;
pub const ILL = 4;
pub const CHLD = 5;
pub const ABRT = 6;
pub const IOT = ABRT;
pub const PIPE = 7;
pub const FPE = 8;
pub const KILL = 9;
pub const STOP = 10;
pub const SEGV = 11;
pub const CONT = 12;
pub const TSTP = 13;
pub const ALRM = 14;
pub const TERM = 15;
pub const TTIN = 16;
pub const TTOU = 17;
pub const USR1 = 18;
pub const USR2 = 19;
pub const WINCH = 20;
pub const KILLTHR = 21;
pub const TRAP = 22;
pub const POLL = 23;
pub const PROF = 24;
pub const SYS = 25;
pub const URG = 26;
pub const VTALRM = 27;
pub const XCPU = 28;
pub const XFSZ = 29;
pub const BUS = 30;
pub const RESERVED1 = 31;
pub const RESERVED2 = 32;
pub const BLOCK = 1;
pub const UNBLOCK = 2;
pub const SETMASK = 3;
},
.openbsd => struct {
pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
pub const CATCH: ?Sigaction.handler_fn = @ptrFromInt(2);
pub const HOLD: ?Sigaction.handler_fn = @ptrFromInt(3);
pub const HUP = 1;
pub const INT = 2;
pub const QUIT = 3;
pub const ILL = 4;
pub const TRAP = 5;
pub const ABRT = 6;
pub const IOT = ABRT;
pub const EMT = 7;
pub const FPE = 8;
pub const KILL = 9;
pub const BUS = 10;
pub const SEGV = 11;
pub const SYS = 12;
pub const PIPE = 13;
pub const ALRM = 14;
pub const TERM = 15;
pub const URG = 16;
pub const STOP = 17;
pub const TSTP = 18;
pub const CONT = 19;
pub const CHLD = 20;
pub const TTIN = 21;
pub const TTOU = 22;
pub const IO = 23;
pub const XCPU = 24;
pub const XFSZ = 25;
pub const VTALRM = 26;
pub const PROF = 27;
pub const WINCH = 28;
pub const INFO = 29;
pub const USR1 = 30;
pub const USR2 = 31;
pub const PWR = 32;
pub const BLOCK = 1;
pub const UNBLOCK = 2;
pub const SETMASK = 3;
},
// https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h
.serenity => struct {
pub const INVAL = 0;
pub const HUP = 1;
pub const INT = 2;
pub const QUIT = 3;
pub const ILL = 4;
pub const TRAP = 5;
pub const ABRT = 6;
pub const BUS = 7;
pub const FPE = 8;
pub const KILL = 9;
pub const USR1 = 10;
pub const SEGV = 11;
pub const USR2 = 12;
pub const PIPE = 13;
pub const ALRM = 14;
pub const TERM = 15;
pub const STKFLT = 16;
pub const CHLD = 17;
pub const CONT = 18;
pub const STOP = 19;
pub const TSTP = 20;
pub const TTIN = 21;
pub const TTOU = 22;
pub const URG = 23;
pub const XCPU = 24;
pub const XFSZ = 25;
pub const VTALRM = 26;
pub const PROF = 27;
pub const WINCH = 28;
pub const IO = 29;
pub const INFO = 30;
pub const SYS = 31;
pub const CANCEL = 32;
},
else => void,
}