1 | module os |
2 | |
3 | // os.Signal - enumerate possible POSIX signals and |
4 | // their integer codes. |
5 | // Note: the integer codes are given here explicitly, |
6 | // to make it easier to lookup, without needing to |
7 | // consult man pages / signal.h . |
8 | |
9 | pub enum Signal { |
10 | hup = 1 |
11 | int = 2 |
12 | quit = 3 |
13 | ill = 4 |
14 | trap = 5 |
15 | abrt = 6 |
16 | bus = 7 |
17 | fpe = 8 |
18 | kill = 9 |
19 | usr1 = 10 |
20 | segv = 11 |
21 | usr2 = 12 |
22 | pipe = 13 |
23 | alrm = 14 |
24 | term = 15 |
25 | stkflt = 16 |
26 | chld = 17 |
27 | cont = 18 |
28 | stop = 19 |
29 | tstp = 20 |
30 | ttin = 21 |
31 | ttou = 22 |
32 | urg = 23 |
33 | xcpu = 24 |
34 | xfsz = 25 |
35 | vtalrm = 26 |
36 | prof = 27 |
37 | winch = 28 |
38 | poll = 29 |
39 | pwr = 30 |
40 | sys = 31 |
41 | } |
42 | |
43 | pub type SignalHandler = fn (Signal) |