|
|
1.1 root 1: /* Version of sigsetmask.c
2: Copyright 1991, 1992 Free Software Foundation, Inc.
3: Written by Steve Chamberlain ([email protected]).
4: Contributed by Cygnus Support.
5:
6: This file is part of the libiberty library.
7: Libiberty is free software; you can redistribute it and/or
8: modify it under the terms of the GNU Library General Public
9: License as published by the Free Software Foundation; either
10: version 2 of the License, or (at your option) any later version.
11:
12: Libiberty is distributed in the hope that it will be useful,
13: but WITHOUT ANY WARRANTY; without even the implied warranty of
14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: Library General Public License for more details.
16:
17: You should have received a copy of the GNU Library General Public
18: License along with libiberty; see the file COPYING.LIB. If
19: not, write to the Free Software Foundation, Inc., 675 Mass Ave,
20: Cambridge, MA 02139, USA. */
21:
22: /* Set the current signal mask to the set provided, and return the
23: previous value */
24:
25: #define _POSIX_SOURCE
26: #include <ansidecl.h>
27: #include <signal.h>
28:
29: #ifdef SIG_SETMASK
30: int
31: DEFUN(sigsetmask,(set),
32: int set)
33: {
34: sigset_t new;
35: sigset_t old;
36:
37: sigemptyset (&new);
38: if (set != 0) {
39: abort(); /* FIXME, we don't know how to translate old mask to new */
40: }
41: sigprocmask(SIG_SETMASK, &new, &old);
42: return 1; /* FIXME, we always return 1 as old value. */
43: }
44: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.