|
|
1.1 root 1: #ifndef __SYS_SIGNAL_H__
2: #define __SYS_SIGNAL_H__
3:
4: #include <common/feature.h>
5: #include <common/_signal.h>
6:
7: /*
8: * Signal numbers, to be used by DDI/DKI device drivers, as described in
9: * signals(D5DK). The numeric values and additional commentary are taken from
10: * the System V, Release 4 "Programmer's Reference Manual".
11: *
12: * If the values in this header are to be imported from <signal.h>, then the
13: * signal-number constants are required to be macros expanding to positive
14: * integral constants as per the ISO C standard (ISO/IEC 9989:1990).
15: *
16: * This header file should not be directly used by user-level code.
17: */
18:
19: #define SIGHUP 1 /*
20: * Hangup: the device has been disconnected
21: * (DDI/DKI).
22: * Default action: terminate.
23: */
24: #define SIGINT 2 /*
25: * Interrupt: the interrupt character has been
26: * received (DDI/DKI).
27: * Default action: terminate.
28: */
29: #define SIGQUIT 3 /*
30: * Quit: the quit character has been received
31: * (DDI/DKI).
32: * Default action: terminate with core image.
33: */
34: #define SIGILL 4 /*
35: * Illegal instruction.
36: * Default action: terminate with core image.
37: */
38: #define SIGTRAP 5 /*
39: * Trace/Breakpoint trap.
40: * Default action: terminate with core image.
41: */
42: #define SIGABRT 6 /*
43: * Abort.
44: * Default action: terminate with core image.
45: */
46: #define SIGIOT SIGABRT /* Obsolete */
47: #define SIGEMT 7 /*
48: * Emulation trap.
49: * Default action: terminate with core image.
50: */
51: #define SIGFPE 8 /*
52: * Arithmetic exception.
53: * Default action: terminate with core image.
54: */
55: #define SIGKILL 9 /*
56: * Kill. It is an error to request a non-
57: * default disposition for this signal. This
58: * signal cannot be blocked.
59: * Default action: terminate.
60: */
61: #define SIGBUS 10 /*
62: * Bus error.
63: * Default action: terminate with core image.
64: */
65: #define SIGSEGV 11 /*
66: * Segmentation violation.
67: * Default action: terminate with core image.
68: */
69: #define SIGSYS 12 /*
70: * Bad system call.
71: * Default action: terminate with core image.
72: */
73: #define SIGPIPE 13 /*
74: * Broken pipe. A write was attempted to a
75: * pipe with no readers.
76: * Default action: terminate.
77: */
78: #define SIGALRM 14 /*
79: * Alarm timer expired.
80: * Default action: terminate.
81: */
82: #define SIGTERM 15 /*
83: * Terminate.
84: * Default action: terminate.
85: */
86: #define SIGUSR1 16 /*
87: * User signal 1.
88: * Default action: terminate.
89: */
90: #define SIGUSR2 17 /*
91: * User signal 2.
92: * Default action: terminate.
93: */
94: #define SIGCHLD 18 /*
95: * Child status changed.
96: * Default action: ignore.
97: */
98: #define SIGCLD SIGCHLD /*
99: * Obsolete alias for SIGCHLD.
100: */
101: #define SIGPWR 19 /*
102: * Power-failure/restart.
103: * Default action: ignore.
104: */
105: #define SIGWINCH 20 /*
106: * Window size changed (DDI/DKI).
107: * Default action: ignore.
108: */
109: #define SIGURG 21 /*
110: * Urgent data are available (DDI/DKI).
111: * Default action: ignore.
112: */
113: #define SIGPOLL 22 /*
114: * Pollable event. A process must specifically
115: * register to receive this signal (DDI/DKI).
116: * Default action: terminate.
117: */
118: #define SIGIO SIGPOLL /* Obsolete BSD brain damage */
119: #define SIGSTOP 23 /*
120: * Stop. Discards pending SIGCONT.
121: * Default action: stop.
122: */
123: #define SIGTSTP 24 /*
124: * Interactive stop. Discards pending SIGCONT.
125: * DDI/DKI character drivers must not send
126: * this signal.
127: * Default action: stop.
128: */
129: #define SIGCONT 25 /*
130: * Continue. Dicards pending SIGSTOP, SIGTSTP,
131: * SIGTTIN, and SIGTTOU signals, and continues
132: * the process if it was stopped.
133: * Default action: ignore.
134: */
135: #define SIGTTIN 26 /*
136: * Job control on input. Discards pending
137: * SIGCONT.
138: * Default action: stop.
139: */
140: #define SIGTTOU 27 /*
141: * Job control on output. Discards pending
142: * SIGCONT.
143: * Default action: stop.
144: */
145: #define SIGVTALARM 28 /*
146: * Virtual timer expired.
147: * Default action: terminate.
148: */
149: #define SIGPROF 29 /*
150: * Profiling timer expired.
151: * Default action: terminate.
152: */
153: #define SIGXCPU 30 /*
154: * CPU time limit exceeded.
155: * Default action: terminate with core image.
156: */
157: #define SIGXFSZ 31 /*
158: * File size limit exceeded.
159: * Default action: terminate with core image.
160: */
161:
162: #if ! _STDC_SOURCE && ! _POSIX_SOURCE
163: #define NSIG _SIGNAL_MAX /* Number of signals */
164: #endif
165:
166: /*
167: * Special arguments to signal.
168: */
169:
170: #define SIG_DFL ((__sigfunc_t) 0) /* Default */
171: #define SIG_IGN ((__sigfunc_t) 1) /* Ignore */
172:
173: #if ! _STDC_SOURCE
174:
175: #define SIG_ERR ((__sigfunc_t) -1) /* Error */
176: #define SIG_HOLD ((__sigfunc_t) 2) /* Hold */
177:
178: #if _SYSV4 && ! _SYSV3
179:
180: typedef n_sigset_t sigset_t;
181:
182: struct sigaction {
183: int sa_flags;
184: __sigfunc_t sa_handler;
185: sigset_t sa_mask;
186: int __NON_POSIX (sa_resv) [2];
187: };
188:
189: #define SA_NOCLDSTOP ((long) __SF_NOCLDSTOP) << 16)
190:
191: #if ! _POSIX_SOURCE
192:
193: #define SA_ONSTACK __SA_ONSTACK
194: #define SA_RESETHAND __SA_RESETHAND
195: #define SA_RESTART __SA_RESTART
196: #define SA_SIGINFO __SA_SIGINFO
197: #define SA_NODEFER __SA_NODEFER
198: #define SA_NOCLDWAIT ((long) __SF_NOCLDWAIT << 16)
199:
200: #endif
201:
202: #else /* ! _SYSV4 */
203:
204: typedef o_sigset_t sigset_t;
205:
206: struct sigaction {
207: __sigfunc_t sa_handler;
208: sigset_t sa_mask;
209: int sa_flags;
210: };
211:
212: #define SA_NOCLDSTOP 1
213:
214: #endif /* ! _SYSV4 */
215:
216: /*
217: * "how" flags for sigprocmask ()
218: */
219:
220: #define SIG_SETMASK 0
221: #define SIG_BLOCK 1
222: #define SIG_UNBLOCK 2
223:
224: #endif /* ! _STDC_SOURCE */
225:
226: #endif /* ! defined (__SYS_SIGNAL_H__) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.