signal.h revision 151867
1105109Smike/*-
21541Srgrimes * Copyright (c) 1982, 1986, 1989, 1991, 1993
31541Srgrimes *	The Regents of the University of California.  All rights reserved.
41541Srgrimes * (c) UNIX System Laboratories, Inc.
51541Srgrimes * All or some portions of this file are derived from material licensed
61541Srgrimes * to the University of California by American Telephone and Telegraph
71541Srgrimes * Co. or Unix System Laboratories, Inc. and are reproduced herein with
81541Srgrimes * the permission of UNIX System Laboratories, Inc.
91541Srgrimes *
101541Srgrimes * Redistribution and use in source and binary forms, with or without
111541Srgrimes * modification, are permitted provided that the following conditions
121541Srgrimes * are met:
131541Srgrimes * 1. Redistributions of source code must retain the above copyright
141541Srgrimes *    notice, this list of conditions and the following disclaimer.
151541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
161541Srgrimes *    notice, this list of conditions and the following disclaimer in the
171541Srgrimes *    documentation and/or other materials provided with the distribution.
181541Srgrimes * 4. Neither the name of the University nor the names of its contributors
191541Srgrimes *    may be used to endorse or promote products derived from this software
201541Srgrimes *    without specific prior written permission.
211541Srgrimes *
221541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
231541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
241541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
251541Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
261541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
271541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
281541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
291541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
301541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
311541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
321541Srgrimes * SUCH DAMAGE.
331541Srgrimes *
3414486Shsu *	@(#)signal.h	8.4 (Berkeley) 5/4/95
3550477Speter * $FreeBSD: head/sys/sys/signal.h 151867 2005-10-30 02:12:49Z davidxu $
361541Srgrimes */
371541Srgrimes
38105109Smike#ifndef _SYS_SIGNAL_H_
391541Srgrimes#define	_SYS_SIGNAL_H_
401541Srgrimes
419343Sbde#include <sys/cdefs.h>
42107376Smike#include <sys/_types.h>
4398301Swollman#include <sys/_sigset.h>
449343Sbde
45149337Sstefanf#include <machine/_limits.h>	/* __MINSIGSTKSZ */
46105109Smike#include <machine/signal.h>	/* sig_atomic_t; trap codes; sigcontext */
47105109Smike
4851791Smarcel/*
4951942Smarcel * System defined signals.
5051791Smarcel */
51105106Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
5251942Smarcel#define	SIGHUP		1	/* hangup */
53105106Smike#endif
5451791Smarcel#define	SIGINT		2	/* interrupt */
55105106Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
5651791Smarcel#define	SIGQUIT		3	/* quit */
57105106Smike#endif
5851791Smarcel#define	SIGILL		4	/* illegal instr. (not reset when caught) */
59105106Smike#if __XSI_VISIBLE
6051791Smarcel#define	SIGTRAP		5	/* trace trap (not reset when caught) */
61105106Smike#endif
6251791Smarcel#define	SIGABRT		6	/* abort() */
63105106Smike#if __BSD_VISIBLE
6451791Smarcel#define	SIGIOT		SIGABRT	/* compatibility */
6551791Smarcel#define	SIGEMT		7	/* EMT instruction */
66105106Smike#endif
6751791Smarcel#define	SIGFPE		8	/* floating point exception */
68105106Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
6951791Smarcel#define	SIGKILL		9	/* kill (cannot be caught or ignored) */
70105106Smike#endif
71105106Smike#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
7251791Smarcel#define	SIGBUS		10	/* bus error */
73105106Smike#endif
7451791Smarcel#define	SIGSEGV		11	/* segmentation violation */
75105106Smike#if __BSD_VISIBLE
7651791Smarcel#define	SIGSYS		12	/* non-existent system call invoked */
77105106Smike#endif
78105106Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
7951791Smarcel#define	SIGPIPE		13	/* write on a pipe with no one to read it */
8051791Smarcel#define	SIGALRM		14	/* alarm clock */
81105106Smike#endif
8251791Smarcel#define	SIGTERM		15	/* software termination signal from kill */
83105106Smike#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
8451791Smarcel#define	SIGURG		16	/* urgent condition on IO channel */
85105106Smike#endif
86105106Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
8751791Smarcel#define	SIGSTOP		17	/* sendable stop signal not from tty */
8851791Smarcel#define	SIGTSTP		18	/* stop signal from tty */
8951791Smarcel#define	SIGCONT		19	/* continue a stopped process */
9051791Smarcel#define	SIGCHLD		20	/* to parent on child stop or exit */
9151791Smarcel#define	SIGTTIN		21	/* to readers pgrp upon background tty read */
9251791Smarcel#define	SIGTTOU		22	/* like TTIN if (tp->t_local&LTOSTOP) */
93105106Smike#endif
94105106Smike#if __BSD_VISIBLE
9551791Smarcel#define	SIGIO		23	/* input/output possible signal */
96105106Smike#endif
97105106Smike#if __XSI_VISIBLE
9851791Smarcel#define	SIGXCPU		24	/* exceeded CPU time limit */
9951791Smarcel#define	SIGXFSZ		25	/* exceeded file size limit */
10051791Smarcel#define	SIGVTALRM	26	/* virtual time alarm */
10151791Smarcel#define	SIGPROF		27	/* profiling time alarm */
102105106Smike#endif
103105106Smike#if __BSD_VISIBLE
10451942Smarcel#define	SIGWINCH	28	/* window size changes */
10551942Smarcel#define	SIGINFO		29	/* information request */
106105106Smike#endif
107105106Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
10851942Smarcel#define	SIGUSR1		30	/* user defined signal 1 */
10951942Smarcel#define	SIGUSR2		31	/* user defined signal 2 */
110105106Smike#endif
111112894Sjeff#if __BSD_VISIBLE
112112885Sjeff#define	SIGTHR		32	/* Thread interrupt. */
113112894Sjeff#endif
1141541Srgrimes
115151306Sdavidxu#define	SIGRTMIN	65
116151306Sdavidxu#define	SIGRTMAX	128
117151306Sdavidxu
118105106Smike#define	SIG_DFL		((__sighandler_t *)0)
119105106Smike#define	SIG_IGN		((__sighandler_t *)1)
120105106Smike#define	SIG_ERR		((__sighandler_t *)-1)
121105106Smike/*
122105106Smike * XXX missing SIG_HOLD.
123105106Smike */
124105106Smike
1259343Sbde/*-
1269343Sbde * Type of a signal handling function.
1279343Sbde *
1289343Sbde * Language spec sez signal handlers take exactly one arg, even though we
1291541Srgrimes * actually supply three.  Ugh!
1309343Sbde *
1319343Sbde * We don't try to hide the difference by leaving out the args because
1329343Sbde * that would cause warnings about conformant programs.  Nonconformant
1339343Sbde * programs can avoid the warnings by casting to (__sighandler_t *) or
1349343Sbde * sig_t before calling signal() or assigning to sa_handler or sv_handler.
1359343Sbde *
1369343Sbde * The kernel should reverse the cast before calling the function.  It
1379343Sbde * has no way to do this, but on most machines 1-arg and 3-arg functions
1389343Sbde * have the same calling protocol so there is no problem in practice.
1399343Sbde * A bit in sa_flags could be used to specify the number of args.
1401541Srgrimes */
141105109Smiketypedef	void __sighandler_t(int);
1421541Srgrimes
143105015Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
144105015Smike#ifndef _SIGSET_T_DECLARED
145105015Smike#define	_SIGSET_T_DECLARED
146105015Smiketypedef	__sigset_t	sigset_t;
147105015Smike#endif
148105015Smike#endif
149105015Smike
150105015Smike#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500
15148621Scracauerunion sigval {
15248621Scracauer	/* Members as suggested by Annex C of POSIX 1003.1b. */
15351942Smarcel	int	sigval_int;
15451942Smarcel	void	*sigval_ptr;
15548621Scracauer};
156105015Smike#endif
15748621Scracauer
158105015Smike#if __POSIX_VISIBLE >= 199309
15952308Smarcelstruct sigevent {
16052308Smarcel	int	sigev_notify;		/* Notification type */
161151867Sdavidxu	int	sigev_signo;		/* Signal number */
162151867Sdavidxu	union sigval sigev_value;	/* Signal value */
16369002Salc	union {
164151867Sdavidxu		__lwpid_t	_threadid;
165151867Sdavidxu		struct {
166151867Sdavidxu			void (*_function)(union sigval *);
167151867Sdavidxu			void *_attribute; /* pthread_attr_t * */
168151867Sdavidxu		} _sigev_thread;
169151867Sdavidxu	} _sigev_un;
17052308Smarcel};
171151867Sdavidxu
172105015Smike#if __BSD_VISIBLE
173151867Sdavidxu#define	sigev_notify_kqueue		sigev_signo
174151867Sdavidxu#define	sigev_notify_thread_id		_sigev_un._threadid
175105015Smike#endif
176151867Sdavidxu#define	sigev_notify_function		_sigev_un._sigev_thread._function
177151867Sdavidxu#define	sigev_notify_attributes		_sigev_un._sigev_thread._attribute
17852308Smarcel
179151867Sdavidxu#define	SIGEV_NONE	0		/* No async notification. */
180151867Sdavidxu#define	SIGEV_SIGNAL	1		/* Generate a queued signal. */
181151867Sdavidxu#define	SIGEV_THREAD	2		/* Call back from another pthread. */
182105015Smike#if __BSD_VISIBLE
183151867Sdavidxu#define	SIGEV_KEVENT	3		/* Generate a kevent. */
184151867Sdavidxu#define	SIGEV_THREAD_ID	4		/* Send signal to a kernel thread. */
185105015Smike#endif
186105015Smike#endif /* __POSIX_VISIBLE >= 199309 */
18752308Smarcel
188105015Smike#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE
189105109Smiketypedef	struct __siginfo {
19051942Smarcel	int	si_signo;		/* signal number */
19151942Smarcel	int	si_errno;		/* errno association */
19252160Smarcel	/*
19348621Scracauer	 * Cause of signal, one of the SI_ macros or signal-specific
194105109Smike	 * values, i.e. one of the FPE_... values for SIGFPE.  This
19548621Scracauer	 * value is equivalent to the second argument to an old-style
19648621Scracauer	 * FreeBSD signal handler.
19748621Scracauer	 */
19851942Smarcel	int	si_code;		/* signal code */
199105015Smike	__pid_t	si_pid;			/* sending process */
200105015Smike	__uid_t	si_uid;			/* sender's ruid */
20151942Smarcel	int	si_status;		/* exit value */
20251942Smarcel	void	*si_addr;		/* faulting instruction */
20351942Smarcel	union sigval si_value;		/* signal value */
20451942Smarcel	long	si_band;		/* band event for SIGPOLL */
205151306Sdavidxu	union	{
206151306Sdavidxu		struct {
207151306Sdavidxu			int	_trapno;/* machine specific trap code */
208151306Sdavidxu		} _fault;
209151574Sdavidxu		struct {
210151574Sdavidxu			int	_timerid;
211151574Sdavidxu			int	_overrun;
212151574Sdavidxu		} _timer;
213151306Sdavidxu		int	__spare__[7];	/* gimme some slack */
214151306Sdavidxu	} _reason;
21551791Smarcel} siginfo_t;
216151306Sdavidxu
217151306Sdavidxu#define si_trapno	_reason._fault._trapno
218151574Sdavidxu#define si_timerid	_reason._timer._timerid
219151574Sdavidxu#define si_overrun	_reason._timer._overrun
220151306Sdavidxu
221151306Sdavidxu/** si_code **/
222151306Sdavidxu/* codes for SIGILL */
223151306Sdavidxu#define ILL_ILLOPC 	1	/* Illegal opcode.			*/
224151306Sdavidxu#define ILL_ILLOPN 	2	/* Illegal operand.			*/
225151306Sdavidxu#define ILL_ILLADR 	3	/* Illegal addressing mode.		*/
226151306Sdavidxu#define ILL_ILLTRP 	4	/* Illegal trap.			*/
227151306Sdavidxu#define ILL_PRVOPC 	5	/* Privileged opcode.			*/
228151306Sdavidxu#define ILL_PRVREG 	6	/* Privileged register.			*/
229151306Sdavidxu#define ILL_COPROC 	7	/* Coprocessor error.			*/
230151306Sdavidxu#define ILL_BADSTK 	8	/* Internal stack error.		*/
231151306Sdavidxu
232151306Sdavidxu/* codes for SIGBUS */
233151306Sdavidxu#define BUS_ADRALN	1	/* Invalid address alignment.		*/
234151306Sdavidxu#define BUS_ADRERR	2	/* Nonexistent physical address.	*/
235151306Sdavidxu#define BUS_OBJERR	3	/* Object-specific hardware error.	*/
236151306Sdavidxu
237151306Sdavidxu/* codes for SIGSEGV */
238151306Sdavidxu#define SEGV_MAPERR	1	/* Address not mapped to object.	*/
239151306Sdavidxu#define SEGV_ACCERR	2	/* Invalid permissions for mapped	*/
240151306Sdavidxu				/* object.				*/
241151306Sdavidxu
242151306Sdavidxu/* codes for SIGFPE */
243151306Sdavidxu#define FPE_INTOVF	1	/* Integer overflow.			*/
244151306Sdavidxu#define FPE_INTDIV	2	/* Integer divide by zero.		*/
245151306Sdavidxu#define FPE_FLTDIV	3	/* Floating point divide by zero.	*/
246151306Sdavidxu#define FPE_FLTOVF	4	/* Floating point overflow.		*/
247151306Sdavidxu#define FPE_FLTUND	5	/* Floating point underflow.		*/
248151306Sdavidxu#define FPE_FLTRES	6	/* Floating point inexact result.	*/
249151306Sdavidxu#define FPE_FLTINV	7	/* Invalid floating point operation.	*/
250151306Sdavidxu#define FPE_FLTSUB	8	/* Subscript out of range.		*/
251151306Sdavidxu
252151306Sdavidxu/* codes for SIGTRAP */
253151306Sdavidxu#define TRAP_BRKPT	1	/* Process breakpoint.			*/
254151306Sdavidxu#define TRAP_TRACE	2	/* Process trace trap.			*/
255151306Sdavidxu
256151306Sdavidxu/* codes for SIGCHLD */
257151306Sdavidxu#define CLD_EXITED	1	/* Child has exited			*/
258151306Sdavidxu#define CLD_KILLED	2	/* Child has terminated abnormally but	*/
259151306Sdavidxu				/* did not create a core file		*/
260151306Sdavidxu#define CLD_DUMPED	3	/* Child has terminated abnormally and	*/
261151306Sdavidxu				/* created a core file			*/
262151306Sdavidxu#define CLD_TRAPPED	4	/* Traced child has trapped		*/
263151306Sdavidxu#define CLD_STOPPED	5	/* Child has stopped			*/
264151306Sdavidxu#define CLD_CONTINUED	6	/* Stopped child has continued		*/
265151306Sdavidxu
266151306Sdavidxu/* codes for SIGPOLL */
267151306Sdavidxu#define POLL_IN		1	/* Data input available			*/
268151306Sdavidxu#define POLL_OUT	2	/* Output buffers available		*/
269151306Sdavidxu#define POLL_MSG	3	/* Input message available		*/
270151306Sdavidxu#define POLL_ERR	4	/* I/O Error				*/
271151306Sdavidxu#define POLL_PRI	5	/* High priority input available	*/
272151306Sdavidxu#define POLL_HUP	4	/* Device disconnected			*/
273151306Sdavidxu
274105015Smike#endif
27548621Scracauer
276105106Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
27751942Smarcelstruct __siginfo;
27851942Smarcel
2791541Srgrimes/*
2801541Srgrimes * Signal vector "template" used in sigaction call.
2811541Srgrimes */
28283045Sobrienstruct sigaction {
28348621Scracauer	union {
28492719Salfred		void    (*__sa_handler)(int);
28592719Salfred		void    (*__sa_sigaction)(int, struct __siginfo *, void *);
28648621Scracauer	} __sigaction_u;		/* signal handler */
28751942Smarcel	int	sa_flags;		/* see signal options below */
28851942Smarcel	sigset_t sa_mask;		/* signal mask to apply */
2891541Srgrimes};
290108382Smike
291108382Smike#define	sa_handler	__sigaction_u.__sa_handler
292105015Smike#endif
29351791Smarcel
294105015Smike#if __XSI_VISIBLE
295108402Smike/* If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. */
296105015Smike#define	sa_sigaction	__sigaction_u.__sa_sigaction
297105015Smike#endif
29851791Smarcel
299105015Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
300105109Smike#define	SA_NOCLDSTOP	0x0008	/* do not generate SIGCHLD on child stop */
301105015Smike#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */
30251791Smarcel
303105015Smike#if __XSI_VISIBLE
304105109Smike#define	SA_ONSTACK	0x0001	/* take signal on signal stack */
305105109Smike#define	SA_RESTART	0x0002	/* restart system call on signal return */
30614331Speter#define	SA_RESETHAND	0x0004	/* reset to SIG_DFL when taking signal */
30714331Speter#define	SA_NODEFER	0x0010	/* don't mask the signal we're delivering */
30829340Sjoerg#define	SA_NOCLDWAIT	0x0020	/* don't keep zombies around */
30948621Scracauer#define	SA_SIGINFO	0x0040	/* signal handler with SA_SIGINFO args */
310105015Smike#endif
3111541Srgrimes
312105015Smike#if __BSD_VISIBLE
313105109Smike#define	NSIG		32	/* number of old signals (counting 0) */
314105015Smike#endif
3151541Srgrimes
316105015Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
317151306Sdavidxu#define	SI_USER		0x10001		/* Signal sent by kill(). */
318151306Sdavidxu#define	SI_QUEUE	0x10002		/* Signal sent by the sigqueue(). */
319151306Sdavidxu#define	SI_TIMER	0x10003		/* Signal generated by expiration of */
320151306Sdavidxu					/* a timer set by timer_settime(). */
321151306Sdavidxu#define	SI_ASYNCIO	0x10004		/* Signal generated by completion of */
322151306Sdavidxu					/* an asynchronous I/O request.*/
323151306Sdavidxu#define	SI_MESGQ	0x10005		/* Signal generated by arrival of a */
324151306Sdavidxu					/* message on an empty message queue. */
325105015Smike#endif
326105015Smike#if __BSD_VISIBLE
327105109Smike#define	SI_UNDEFINED	0
328105015Smike#endif
32951791Smarcel
330105106Smike#if __BSD_VISIBLE
3319343Sbdetypedef	__sighandler_t	*sig_t;	/* type of pointer to a signal function */
332105106Smiketypedef	void __siginfohandler_t(int, struct __siginfo *, void *);
333105106Smike#endif
3341541Srgrimes
335105015Smike#if __XSI_VISIBLE
3361541Srgrimes/*
33751942Smarcel * Structure used in sigaltstack call.
3381541Srgrimes */
339105015Smike#if __BSD_VISIBLE
340105015Smiketypedef	struct sigaltstack {
341105015Smike#else
342105015Smiketypedef	struct {
343105015Smike#endif
34451942Smarcel	char	*ss_sp;			/* signal stack base */
345105015Smike	__size_t ss_size;		/* signal stack length */
34651942Smarcel	int	ss_flags;		/* SS_DISABLE and/or SS_ONSTACK */
34751791Smarcel} stack_t;
34851791Smarcel
34914331Speter#define	SS_ONSTACK	0x0001	/* take signal on alternate stack */
35014331Speter#define	SS_DISABLE	0x0004	/* disable taking signals on alternate stack */
351149337Sstefanf#define	MINSIGSTKSZ	__MINSIGSTKSZ		/* minimum stack size */
3521541Srgrimes#define	SIGSTKSZ	(MINSIGSTKSZ + 32768)	/* recommended stack size */
353105015Smike#endif
3541541Srgrimes
355105015Smike#if __BSD_VISIBLE
35651791Smarcel/*
3571541Srgrimes * 4.3 compatibility:
3581541Srgrimes * Signal vector "template" used in sigvec call.
3591541Srgrimes */
36083045Sobrienstruct sigvec {
36151942Smarcel	__sighandler_t *sv_handler;	/* signal handler */
36251942Smarcel	int	sv_mask;		/* signal mask to apply */
36351942Smarcel	int	sv_flags;		/* see signal options below */
3641541Srgrimes};
3651541Srgrimes
366105109Smike#define	SV_ONSTACK	SA_ONSTACK
367105109Smike#define	SV_INTERRUPT	SA_RESTART	/* same bit, opposite sense */
368105109Smike#define	SV_RESETHAND	SA_RESETHAND
369105109Smike#define	SV_NODEFER	SA_NODEFER
370105109Smike#define	SV_NOCLDSTOP	SA_NOCLDSTOP
371105109Smike#define	SV_SIGINFO	SA_SIGINFO
372105109Smike#define	sv_onstack	sv_flags	/* isn't compatibility wonderful! */
373105015Smike#endif
3741541Srgrimes
375105950Speter/* Keep this in one place only */
376105950Speter#if defined(_KERNEL) && defined(COMPAT_43) && \
377105950Speter    !defined(__i386__) && !defined(__alpha__)
378105950Speterstruct osigcontext {
379105950Speter	int _not_used;
380105950Speter};
381105950Speter#endif
382105950Speter
383105015Smike#if __XSI_VISIBLE
3841541Srgrimes/*
3851541Srgrimes * Structure used in sigstack call.
3861541Srgrimes */
38783045Sobrienstruct sigstack {
388105015Smike	/* XXX ss_sp's type should be `void *'. */
38951942Smarcel	char	*ss_sp;			/* signal stack pointer */
39051942Smarcel	int	ss_onstack;		/* current status */
3911541Srgrimes};
392105015Smike#endif
3931541Srgrimes
394105015Smike#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112
3951541Srgrimes/*
3961541Srgrimes * Macro for converting signal number to a mask suitable for
3971541Srgrimes * sigblock().
3981541Srgrimes */
399105109Smike#define	sigmask(m)	(1 << ((m)-1))
400105015Smike#endif
4011541Srgrimes
402105015Smike#if __BSD_VISIBLE
4031541Srgrimes#define	BADSIG		SIG_ERR
404105015Smike#endif
4051541Srgrimes
406105015Smike#if __POSIX_VISIBLE || __XSI_VISIBLE
40751791Smarcel/*
40851791Smarcel * Flags for sigprocmask:
40951791Smarcel */
41051791Smarcel#define	SIG_BLOCK	1	/* block specified signal set */
41151791Smarcel#define	SIG_UNBLOCK	2	/* unblock specified signal set */
41251791Smarcel#define	SIG_SETMASK	3	/* set specified signal set */
413105015Smike#endif
41434925Sdufault
4151541Srgrimes/*
4161541Srgrimes * For historical reasons; programs expect signal's return value to be
4171541Srgrimes * defined by <sys/signal.h>.
4181541Srgrimes */
4191541Srgrimes__BEGIN_DECLS
42092719Salfred__sighandler_t *signal(int, __sighandler_t *);
4211541Srgrimes__END_DECLS
4229343Sbde
423105109Smike#endif /* !_SYS_SIGNAL_H_ */
424