17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
55403172aSRoger A. Faulkner  * Common Development and Distribution License (the "License").
65403172aSRoger A. Faulkner  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
215403172aSRoger A. Faulkner 
227c478bd9Sstevel@tonic-gate /*
23bdf0047cSRoger A. Faulkner  * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28*b4203d75SMarcel Telka /*	  All Rights Reserved	*/
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate /*
317c478bd9Sstevel@tonic-gate  * An application should not include this header directly.  Instead it
327c478bd9Sstevel@tonic-gate  * should be included only through the inclusion of other Sun headers.
337c478bd9Sstevel@tonic-gate  *
347c478bd9Sstevel@tonic-gate  * The contents of this header is limited to identifiers specified in the
357c478bd9Sstevel@tonic-gate  * C Standard.  Any new identifiers specified in future amendments to the
367c478bd9Sstevel@tonic-gate  * C Standard must be placed in this header.  If these new identifiers
377c478bd9Sstevel@tonic-gate  * are required to also be in the C++ Standard "std" namespace, then for
387c478bd9Sstevel@tonic-gate  * anything other than macro definitions, corresponding "using" directives
397c478bd9Sstevel@tonic-gate  * must also be added to <sys/signal.h.h>.
407c478bd9Sstevel@tonic-gate  */
417c478bd9Sstevel@tonic-gate 
427c478bd9Sstevel@tonic-gate #ifndef _SYS_SIGNAL_ISO_H
437c478bd9Sstevel@tonic-gate #define	_SYS_SIGNAL_ISO_H
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate #include <sys/unistd.h>		/* needed for _SC_SIGRT_MIN/MAX */
467c478bd9Sstevel@tonic-gate 
477c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
487c478bd9Sstevel@tonic-gate extern "C" {
497c478bd9Sstevel@tonic-gate #endif
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate #define	SIGHUP	1	/* hangup */
527c478bd9Sstevel@tonic-gate #define	SIGINT	2	/* interrupt (rubout) */
537c478bd9Sstevel@tonic-gate #define	SIGQUIT	3	/* quit (ASCII FS) */
547c478bd9Sstevel@tonic-gate #define	SIGILL	4	/* illegal instruction (not reset when caught) */
557c478bd9Sstevel@tonic-gate #define	SIGTRAP	5	/* trace trap (not reset when caught) */
567c478bd9Sstevel@tonic-gate #define	SIGIOT	6	/* IOT instruction */
577c478bd9Sstevel@tonic-gate #define	SIGABRT 6	/* used by abort, replace SIGIOT in the future */
587c478bd9Sstevel@tonic-gate #define	SIGEMT	7	/* EMT instruction */
597c478bd9Sstevel@tonic-gate #define	SIGFPE	8	/* floating point exception */
607c478bd9Sstevel@tonic-gate #define	SIGKILL	9	/* kill (cannot be caught or ignored) */
617c478bd9Sstevel@tonic-gate #define	SIGBUS	10	/* bus error */
627c478bd9Sstevel@tonic-gate #define	SIGSEGV	11	/* segmentation violation */
637c478bd9Sstevel@tonic-gate #define	SIGSYS	12	/* bad argument to system call */
647c478bd9Sstevel@tonic-gate #define	SIGPIPE	13	/* write on a pipe with no one to read it */
657c478bd9Sstevel@tonic-gate #define	SIGALRM	14	/* alarm clock */
667c478bd9Sstevel@tonic-gate #define	SIGTERM	15	/* software termination signal from kill */
677c478bd9Sstevel@tonic-gate #define	SIGUSR1	16	/* user defined signal 1 */
687c478bd9Sstevel@tonic-gate #define	SIGUSR2	17	/* user defined signal 2 */
697c478bd9Sstevel@tonic-gate #define	SIGCLD	18	/* child status change */
707c478bd9Sstevel@tonic-gate #define	SIGCHLD	18	/* child status change alias (POSIX) */
717c478bd9Sstevel@tonic-gate #define	SIGPWR	19	/* power-fail restart */
727c478bd9Sstevel@tonic-gate #define	SIGWINCH 20	/* window size change */
737c478bd9Sstevel@tonic-gate #define	SIGURG	21	/* urgent socket condition */
747c478bd9Sstevel@tonic-gate #define	SIGPOLL 22	/* pollable event occured */
757c478bd9Sstevel@tonic-gate #define	SIGIO	SIGPOLL	/* socket I/O possible (SIGPOLL alias) */
767c478bd9Sstevel@tonic-gate #define	SIGSTOP 23	/* stop (cannot be caught or ignored) */
777c478bd9Sstevel@tonic-gate #define	SIGTSTP 24	/* user stop requested from tty */
787c478bd9Sstevel@tonic-gate #define	SIGCONT 25	/* stopped process has been continued */
797c478bd9Sstevel@tonic-gate #define	SIGTTIN 26	/* background tty read attempted */
807c478bd9Sstevel@tonic-gate #define	SIGTTOU 27	/* background tty write attempted */
817c478bd9Sstevel@tonic-gate #define	SIGVTALRM 28	/* virtual timer expired */
827c478bd9Sstevel@tonic-gate #define	SIGPROF 29	/* profiling timer expired */
837c478bd9Sstevel@tonic-gate #define	SIGXCPU 30	/* exceeded cpu limit */
847c478bd9Sstevel@tonic-gate #define	SIGXFSZ 31	/* exceeded file size limit */
857c478bd9Sstevel@tonic-gate #define	SIGWAITING 32	/* reserved signal no longer used by threading code */
867c478bd9Sstevel@tonic-gate #define	SIGLWP	33	/* reserved signal no longer used by threading code */
877c478bd9Sstevel@tonic-gate #define	SIGFREEZE 34	/* special signal used by CPR */
887c478bd9Sstevel@tonic-gate #define	SIGTHAW 35	/* special signal used by CPR */
897c478bd9Sstevel@tonic-gate #define	SIGCANCEL 36	/* reserved signal for thread cancellation */
907c478bd9Sstevel@tonic-gate #define	SIGLOST	37	/* resource lost (eg, record-lock lost) */
917c478bd9Sstevel@tonic-gate #define	SIGXRES	38	/* resource control exceeded */
927c478bd9Sstevel@tonic-gate #define	SIGJVM1	39	/* reserved signal for Java Virtual Machine */
937c478bd9Sstevel@tonic-gate #define	SIGJVM2	40	/* reserved signal for Java Virtual Machine */
9419d32b9aSRobert Mustacchi #define	SIGINFO	41	/* information request */
957c478bd9Sstevel@tonic-gate 
967c478bd9Sstevel@tonic-gate /* insert new signals here, and move _SIGRTM* appropriately */
9719d32b9aSRobert Mustacchi #define	_SIGRTMIN 42	/* first (highest-priority) realtime signal */
9819d32b9aSRobert Mustacchi #define	_SIGRTMAX 73	/* last (lowest-priority) realtime signal */
997c478bd9Sstevel@tonic-gate extern long _sysconf(int);	/* System Private interface to sysconf() */
1007c478bd9Sstevel@tonic-gate #define	SIGRTMIN ((int)_sysconf(_SC_SIGRT_MIN))	/* first realtime signal */
1017c478bd9Sstevel@tonic-gate #define	SIGRTMAX ((int)_sysconf(_SC_SIGRT_MAX))	/* last realtime signal */
1027c478bd9Sstevel@tonic-gate 
1037c478bd9Sstevel@tonic-gate #if	defined(__cplusplus)
1047c478bd9Sstevel@tonic-gate 
1057c478bd9Sstevel@tonic-gate typedef	void SIG_FUNC_TYP(int);
1067c478bd9Sstevel@tonic-gate typedef	SIG_FUNC_TYP *SIG_TYP;
1077c478bd9Sstevel@tonic-gate #define	SIG_PF SIG_TYP
1087c478bd9Sstevel@tonic-gate 
1097c478bd9Sstevel@tonic-gate #define	SIG_DFL	(SIG_PF)0
1107c478bd9Sstevel@tonic-gate #define	SIG_ERR (SIG_PF)-1
1117c478bd9Sstevel@tonic-gate #define	SIG_IGN	(SIG_PF)1
1127c478bd9Sstevel@tonic-gate #define	SIG_HOLD (SIG_PF)2
1137c478bd9Sstevel@tonic-gate 
1147c478bd9Sstevel@tonic-gate #elif	defined(__lint)
1157c478bd9Sstevel@tonic-gate 
1167c478bd9Sstevel@tonic-gate #define	SIG_DFL	(void(*)())0
1177c478bd9Sstevel@tonic-gate #define	SIG_ERR (void(*)())0
1187c478bd9Sstevel@tonic-gate #define	SIG_IGN	(void (*)())0
1197c478bd9Sstevel@tonic-gate #define	SIG_HOLD (void(*)())0
1207c478bd9Sstevel@tonic-gate 
1217c478bd9Sstevel@tonic-gate #else
1227c478bd9Sstevel@tonic-gate 
1237c478bd9Sstevel@tonic-gate #define	SIG_DFL	(void(*)())0
1247c478bd9Sstevel@tonic-gate #define	SIG_ERR	(void(*)())-1
1257c478bd9Sstevel@tonic-gate #define	SIG_IGN	(void (*)())1
1267c478bd9Sstevel@tonic-gate #define	SIG_HOLD (void(*)())2
1277c478bd9Sstevel@tonic-gate 
1287c478bd9Sstevel@tonic-gate #endif
1297c478bd9Sstevel@tonic-gate 
1307c478bd9Sstevel@tonic-gate #define	SIG_BLOCK	1
1317c478bd9Sstevel@tonic-gate #define	SIG_UNBLOCK	2
1327c478bd9Sstevel@tonic-gate #define	SIG_SETMASK	3
1337c478bd9Sstevel@tonic-gate 
1347c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
1357c478bd9Sstevel@tonic-gate }
1367c478bd9Sstevel@tonic-gate #endif
1377c478bd9Sstevel@tonic-gate 
1387c478bd9Sstevel@tonic-gate #endif /* _SYS_SIGNAL_ISO_H */
139