2 * sigact.h - sigaction et al
8 * This header is the interface to a fake sigaction(2)
9 * implementation. It provides a POSIX compliant interface
10 * to whatever signal handling mechanisms are available.
11 * It also provides a _Signal() function that is implemented
12 * in terms of sigaction().
13 * If not using signal(2) as part of the underlying
14 * implementation (USE_SIGNAL or USE_SIGMASK), and
15 * NO_SIGNAL is not defined, it also provides a signal()
16 * function that calls _Signal().
25 /* Changes to sigact.h for pdksh, Michael Rendell <michael@cs.mun.ca>:
26 * - changed SIG_HDLR to void for use with GNU autoconf
27 * - ifdef'd out ARGS(), volatile and const initializations
28 * - ifdef'd out sigset_t definition - let autoconf handle it
29 * - ifdef out routines not used in ksh if IS_KSH is defined
36 * if you want to install this header as signal.h,
37 * modify this to pick up the original signal.h
48 # define SIG_ERR ((handler_t) -1)
51 # define BADSIG SIG_ERR
55 /* we assume we need the fake sigaction */
57 #define SA_NOCLDSTOP 1 /* don't send SIGCHLD on child stop */
58 #define SA_RESTART 2 /* re-start I/O */
60 /* sigprocmask flags */
61 #ifdef AMIGA /* AmigaOS4 changes by Thomas Frieden */
71 #if !defined(__sys_stdtypes_h) && !defined(CLIB2)
72 typedef unsigned int sigset_t
;
76 * POSIX sa_handler should return void, but since we are
77 * implementing in terms of something else, it may
78 * be appropriate to use the normal void return type
87 #if !defined(__AROS__)
88 int sigaction(int, struct sigaction
*, struct sigaction
*);
90 int sigaddset(sigset_t
*, int);
91 int sigemptyset(sigset_t
*);
93 #ifdef AMIGA /* AmigaOS4 changes by Thomas Frieden */
94 int sigprocmask(int, const sigset_t
*, sigset_t
*);
96 int sigprocmask(int, sigset_t
*, sigset_t
*);
99 int sigsuspend(sigset_t
*);
102 # define sigmask(s) (1<<((s)-1)) /* convert SIGnum to mask */
104 #if !defined(NSIG) && defined(_NSIG)
107 #endif /* ! SA_NOCLDSTOP */
108 #endif /* _SIGACT_H */