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