|
Last change
on this file since 108 was 10, checked in by bird, 23 years ago |
|
Initial revision
|
-
Property cvs2svn:cvs-rev
set to
1.1
-
Property svn:eol-style
set to
native
-
Property svn:executable
set to
*
|
|
File size:
785 bytes
|
| Line | |
|---|
| 1 | /* Version of sigsetmask.c
|
|---|
| 2 | Written by Steve Chamberlain (sac@cygnus.com).
|
|---|
| 3 | Contributed by Cygnus Support.
|
|---|
| 4 | This file is in the public doamin. */
|
|---|
| 5 |
|
|---|
| 6 | /* Set the current signal mask to the set provided, and return the
|
|---|
| 7 | previous value */
|
|---|
| 8 |
|
|---|
| 9 | #define _POSIX_SOURCE
|
|---|
| 10 | #include <ansidecl.h>
|
|---|
| 11 | /* Including <sys/types.h> seems to be needed by ISC. */
|
|---|
| 12 | #include <sys/types.h>
|
|---|
| 13 | #include <signal.h>
|
|---|
| 14 |
|
|---|
| 15 | extern void abort PARAMS ((void)) ATTRIBUTE_NORETURN;
|
|---|
| 16 |
|
|---|
| 17 | #ifdef SIG_SETMASK
|
|---|
| 18 | int
|
|---|
| 19 | DEFUN(sigsetmask,(set),
|
|---|
| 20 | int set)
|
|---|
| 21 | {
|
|---|
| 22 | sigset_t new;
|
|---|
| 23 | sigset_t old;
|
|---|
| 24 |
|
|---|
| 25 | sigemptyset (&new);
|
|---|
| 26 | if (set != 0) {
|
|---|
| 27 | abort(); /* FIXME, we don't know how to translate old mask to new */
|
|---|
| 28 | }
|
|---|
| 29 | sigprocmask(SIG_SETMASK, &new, &old);
|
|---|
| 30 | return 1; /* FIXME, we always return 1 as old value. */
|
|---|
| 31 | }
|
|---|
| 32 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.