os: document the various enum values in os.Signal (#22770)

This commit is contained in:
Hitalo Souza 2024-11-05 14:50:09 -04:00 committed by GitHub
parent d9c3ac5ce6
commit 402e239edf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,37 +7,37 @@ module os
// consult man pages / signal.h . // consult man pages / signal.h .
pub enum Signal { pub enum Signal {
hup = 1 hup = 1 // hangup
int = 2 int = 2 // interrupt from keyboard
quit = 3 quit = 3 // quit from keyboard
ill = 4 ill = 4 // illegal instruction
trap = 5 trap = 5 // trace trap
abrt = 6 abrt = 6 // abort
bus = 7 bus = 7 // bus error
fpe = 8 fpe = 8 // floating point exception
kill = 9 kill = 9 // kill signal
usr1 = 10 usr1 = 10 // user-defined signal 1
segv = 11 segv = 11 // segmentation violation
usr2 = 12 usr2 = 12 // user-defined signal 2
pipe = 13 pipe = 13 // write on a pipe with no one to read it
alrm = 14 alrm = 14 // alarm clock
term = 15 term = 15 // software termination signal
stkflt = 16 stkflt = 16 // stack fault
chld = 17 chld = 17 // child process has stopped or exited
cont = 18 cont = 18 // continue executing, if stopped
stop = 19 stop = 19 // stop executing (cannot be caught or ignored)
tstp = 20 tstp = 20 // stop executing, can be caught and ignored
ttin = 21 ttin = 21 // terminal input for background process
ttou = 22 ttou = 22 // terminal output for background process
urg = 23 urg = 23 // urgent condition on socket
xcpu = 24 xcpu = 24 // CPU time limit exceeded
xfsz = 25 xfsz = 25 // file size limit exceeded
vtalrm = 26 vtalrm = 26 // virtual time alarm
prof = 27 prof = 27 // profiling timer alarm
winch = 28 winch = 28 // window size change
poll = 29 poll = 29 // pollable event occurred
pwr = 30 pwr = 30 // power failure
sys = 31 sys = 31 // bad system call
} }
pub type SignalHandler = fn (Signal) pub type SignalHandler = fn (Signal)