1 /* sigprocmask.c: A replacement for the sigprocmask() function
3 %%% portions-copyright-cmetz
4 Portions of this software are Copyright 1996 by Craig Metz, All Rights
5 Reserved. The Inner Net License Version 2 applies to these portions of
7 You should have received a copy of the license with this software. If
8 you didn't get a copy, you may request one from <license@inner.net>.
10 Portions of this software are Copyright 1995 by Randall Atkinson and Dan
11 McDonald, All Rights Reserved. All Rights under this copyright are assigned
12 to the U.S. Naval Research Laboratory (NRL). The NRL Copyright Notice and
13 License Agreement applies to this software.
17 Created by cmetz for OPIE 2.2 from popen.c. Use FUNCTION
18 declaration et al. Include opie.h.
23 #include <sys/types.h>
26 #endif /* HAVE_SIGNAL_H */
28 #include <sys/signal.h>
29 #endif /* HAVE_SYS_SIGNAL_H */
31 #if !HAVE_SIGBLOCK || !HAVE_SIGSETMASK
32 Without sigblock
and sigsetmask
, we can
't build a replacement sigprocmask.
33 #endif /* !HAVE_SIGBLOCK || !HAVE_SIGSETMASK */
41 int sigprocmask FUNCTION((how, set, oset), int how AND sigset_t *set AND sigset_t *oset)
45 if (set && (set != (sigset_t *)SIG_IGN) && (set != (sigset_t *)SIG_ERR))
53 if (oset && (oset != (sigset_t *)SIG_IGN) && (oset != (sigset_t *)SIG_ERR))
58 old = sigsetmask(new);
59 if (oset && (oset != (sigset_t *)SIG_IGN) && (oset != (sigset_t *)SIG_ERR))