xref: /titanic_50/usr/src/cmd/ssh/include/sigact.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*	$OpenBSD: SigAction.h,v 1.2 1999/06/27 08:15:19 millert Exp $	*/
2*7c478bd9Sstevel@tonic-gate 
3*7c478bd9Sstevel@tonic-gate #ifndef	_SIGACT_H
4*7c478bd9Sstevel@tonic-gate #define	_SIGACT_H
5*7c478bd9Sstevel@tonic-gate 
6*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
7*7c478bd9Sstevel@tonic-gate 
8*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
9*7c478bd9Sstevel@tonic-gate extern "C" {
10*7c478bd9Sstevel@tonic-gate #endif
11*7c478bd9Sstevel@tonic-gate 
12*7c478bd9Sstevel@tonic-gate 
13*7c478bd9Sstevel@tonic-gate /****************************************************************************
14*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1998 Free Software Foundation, Inc.                        *
15*7c478bd9Sstevel@tonic-gate  *                                                                          *
16*7c478bd9Sstevel@tonic-gate  * Permission is hereby granted, free of charge, to any person obtaining a  *
17*7c478bd9Sstevel@tonic-gate  * copy of this software and associated documentation files (the            *
18*7c478bd9Sstevel@tonic-gate  * "Software"), to deal in the Software without restriction, including      *
19*7c478bd9Sstevel@tonic-gate  * without limitation the rights to use, copy, modify, merge, publish,      *
20*7c478bd9Sstevel@tonic-gate  * distribute, distribute with modifications, sublicense, and/or sell       *
21*7c478bd9Sstevel@tonic-gate  * copies of the Software, and to permit persons to whom the Software is    *
22*7c478bd9Sstevel@tonic-gate  * furnished to do so, subject to the following conditions:                 *
23*7c478bd9Sstevel@tonic-gate  *                                                                          *
24*7c478bd9Sstevel@tonic-gate  * The above copyright notice and this permission notice shall be included  *
25*7c478bd9Sstevel@tonic-gate  * in all copies or substantial portions of the Software.                   *
26*7c478bd9Sstevel@tonic-gate  *                                                                          *
27*7c478bd9Sstevel@tonic-gate  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
28*7c478bd9Sstevel@tonic-gate  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
29*7c478bd9Sstevel@tonic-gate  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
30*7c478bd9Sstevel@tonic-gate  * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
31*7c478bd9Sstevel@tonic-gate  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
32*7c478bd9Sstevel@tonic-gate  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
33*7c478bd9Sstevel@tonic-gate  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
34*7c478bd9Sstevel@tonic-gate  *                                                                          *
35*7c478bd9Sstevel@tonic-gate  * Except as contained in this notice, the name(s) of the above copyright   *
36*7c478bd9Sstevel@tonic-gate  * holders shall not be used in advertising or otherwise to promote the     *
37*7c478bd9Sstevel@tonic-gate  * sale, use or other dealings in this Software without prior written       *
38*7c478bd9Sstevel@tonic-gate  * authorization.                                                           *
39*7c478bd9Sstevel@tonic-gate  ****************************************************************************/
40*7c478bd9Sstevel@tonic-gate 
41*7c478bd9Sstevel@tonic-gate /****************************************************************************
42*7c478bd9Sstevel@tonic-gate  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995               *
43*7c478bd9Sstevel@tonic-gate  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
44*7c478bd9Sstevel@tonic-gate  ****************************************************************************/
45*7c478bd9Sstevel@tonic-gate 
46*7c478bd9Sstevel@tonic-gate /*
47*7c478bd9Sstevel@tonic-gate  * $From: SigAction.h,v 1.5 1999/06/19 23:00:54 tom Exp $
48*7c478bd9Sstevel@tonic-gate  *
49*7c478bd9Sstevel@tonic-gate  * This file exists to handle non-POSIX systems which don't have <unistd.h>,
50*7c478bd9Sstevel@tonic-gate  * and usually no sigaction() nor <termios.h>
51*7c478bd9Sstevel@tonic-gate  */
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate #if !defined(HAVE_SIGACTION) && defined(HAVE_SIGVEC)
54*7c478bd9Sstevel@tonic-gate 
55*7c478bd9Sstevel@tonic-gate #undef  SIG_BLOCK
56*7c478bd9Sstevel@tonic-gate #define SIG_BLOCK       00
57*7c478bd9Sstevel@tonic-gate 
58*7c478bd9Sstevel@tonic-gate #undef  SIG_UNBLOCK
59*7c478bd9Sstevel@tonic-gate #define SIG_UNBLOCK     01
60*7c478bd9Sstevel@tonic-gate 
61*7c478bd9Sstevel@tonic-gate #undef  SIG_SETMASK
62*7c478bd9Sstevel@tonic-gate #define SIG_SETMASK     02
63*7c478bd9Sstevel@tonic-gate 
64*7c478bd9Sstevel@tonic-gate /*
65*7c478bd9Sstevel@tonic-gate  * <bsd/signal.h> is in the Linux 1.2.8 + gcc 2.7.0 configuration,
66*7c478bd9Sstevel@tonic-gate  * and is useful for testing this header file.
67*7c478bd9Sstevel@tonic-gate  */
68*7c478bd9Sstevel@tonic-gate #if HAVE_BSD_SIGNAL_H
69*7c478bd9Sstevel@tonic-gate # include <bsd/signal.h>
70*7c478bd9Sstevel@tonic-gate #endif
71*7c478bd9Sstevel@tonic-gate 
72*7c478bd9Sstevel@tonic-gate struct sigaction
73*7c478bd9Sstevel@tonic-gate {
74*7c478bd9Sstevel@tonic-gate 	struct sigvec sv;
75*7c478bd9Sstevel@tonic-gate };
76*7c478bd9Sstevel@tonic-gate 
77*7c478bd9Sstevel@tonic-gate typedef unsigned long sigset_t;
78*7c478bd9Sstevel@tonic-gate 
79*7c478bd9Sstevel@tonic-gate #undef  sa_mask
80*7c478bd9Sstevel@tonic-gate #define sa_mask sv.sv_mask
81*7c478bd9Sstevel@tonic-gate #undef  sa_handler
82*7c478bd9Sstevel@tonic-gate #define sa_handler sv.sv_handler
83*7c478bd9Sstevel@tonic-gate #undef  sa_flags
84*7c478bd9Sstevel@tonic-gate #define sa_flags sv.sv_flags
85*7c478bd9Sstevel@tonic-gate 
86*7c478bd9Sstevel@tonic-gate int sigaction(int sig, struct sigaction *sigact, struct sigaction *osigact);
87*7c478bd9Sstevel@tonic-gate int sigprocmask (int how, sigset_t *mask, sigset_t *omask);
88*7c478bd9Sstevel@tonic-gate int sigemptyset (sigset_t *mask);
89*7c478bd9Sstevel@tonic-gate int sigsuspend (sigset_t *mask);
90*7c478bd9Sstevel@tonic-gate int sigdelset (sigset_t *mask, int sig);
91*7c478bd9Sstevel@tonic-gate int sigaddset (sigset_t *mask, int sig);
92*7c478bd9Sstevel@tonic-gate 
93*7c478bd9Sstevel@tonic-gate #endif /* !defined(HAVE_SIGACTION) && defined(HAVE_SIGVEC) */
94*7c478bd9Sstevel@tonic-gate 
95*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
96*7c478bd9Sstevel@tonic-gate }
97*7c478bd9Sstevel@tonic-gate #endif
98*7c478bd9Sstevel@tonic-gate 
99*7c478bd9Sstevel@tonic-gate #endif /* _SIGACT_H */
100