3 #pragma lib "/$M/lib/ape/libap.a"
5 typedef int sig_atomic_t;
8 * We don't give arg types for signal handlers, in spite of ANSI requirement
9 * that it be 'int' (the signal number), because some programs need an
10 * additional context argument. So the real type of signal handlers is
11 * void handler(int sig, char *, struct Ureg *)
12 * where the char * is the Plan 9 message and Ureg is defined in <ureg.h>
14 #define SIG_DFL ((void (*)())0)
15 #define SIG_ERR ((void (*)())-1)
16 #define SIG_IGN ((void (*)())1)
18 #define SIGHUP 1 /* hangup */
19 #define SIGINT 2 /* interrupt */
20 #define SIGQUIT 3 /* quit */
21 #define SIGILL 4 /* illegal instruction (not reset when caught)*/
22 #define SIGABRT 5 /* used by abort */
23 #define SIGFPE 6 /* floating point exception */
24 #define SIGKILL 7 /* kill (cannot be caught or ignored) */
25 #define SIGSEGV 8 /* segmentation violation */
26 #define SIGPIPE 9 /* write on a pipe with no one to read it */
27 #define SIGALRM 10 /* alarm clock */
28 #define SIGTERM 11 /* software termination signal from kill */
29 #define SIGUSR1 12 /* user defined signal 1 */
30 #define SIGUSR2 13 /* user defined signal 2 */
31 #define SIGBUS 14 /* bus error */
33 /* The following symbols must be defined, but the signals needn't be supported */
34 #define SIGCHLD 15 /* child process terminated or stopped */
35 #define SIGCONT 16 /* continue if stopped */
36 #define SIGSTOP 17 /* stop */
37 #define SIGTSTP 18 /* interactive stop */
38 #define SIGTTIN 19 /* read from ctl tty by member of background */
39 #define SIGTTOU 20 /* write to ctl tty by member of background */
49 extern void (*signal(int, void (*)()))();
50 extern int raise(int);
58 typedef long sigset_t;
64 /* values for sa_flags */
65 #define SA_NOCLDSTOP 1
67 /* first argument to sigprocmask */
77 extern int kill(pid_t, int);
79 extern int sigemptyset(sigset_t *);
80 extern int sigfillset(sigset_t *);
81 extern int sigaddset(sigset_t *, int);
82 extern int sigdelset(sigset_t *, int);
83 extern int sigismember(const sigset_t *, int);
84 extern int sigaction(int, const struct sigaction *, struct sigaction *);
85 extern int sigprocmask(int, sigset_t *, sigset_t *);
86 extern int sigpending(sigset_t *);
87 extern int sigsuspend(const sigset_t *);
93 #endif /* _POSIX_SOURCE */
95 #endif /* __SIGNAL_H */