| 1 | .\" Copyright (c) 1983, 1991 The Regents of the University of California. |
| 2 | .\" All rights reserved. |
| 3 | .\" |
| 4 | .\" %sccs.include.redist.man% |
| 5 | .\" |
| 6 | .\" @(#)sigsetops.3 6.2 (Berkeley) %G% |
| 7 | .\" |
| 8 | .Dd |
| 9 | .Dt SIGSETOPS 3 |
| 10 | .Os |
| 11 | .Sh NAME |
| 12 | .Nm sigsetops , |
| 13 | .Nm sigemptyset , |
| 14 | .Nm sigfillset , |
| 15 | .Nm sigaddset , |
| 16 | .Nm sigdelset , |
| 17 | .Nm sigismember |
| 18 | .Nd manipulate signal masks |
| 19 | .Sh SYNOPSIS |
| 20 | .Fd #include <signal.h> |
| 21 | .Fn sigemptyset "sigset_t *set" |
| 22 | .Fn sigfillset "sigset_t *set" |
| 23 | .Fn sigaddset "sigset_t *set" "int signo" |
| 24 | .Fn sigdelset "sigset_t *set" "int signo" |
| 25 | .Fn sigismember "sigset_t *set" "int signo" |
| 26 | .Sh DESCRIPTION |
| 27 | These functions manipulate signal mask stored in a |
| 28 | .Fa sigset_t . |
| 29 | They are provided as macros, but actual functions are available |
| 30 | if their names are undefined (with #undef |
| 31 | .Em name ) . |
| 32 | .Pp |
| 33 | The |
| 34 | .Fn sigemptyset |
| 35 | function initializes a signal set to be empty. |
| 36 | The |
| 37 | .Fn sigfillset |
| 38 | function initializes a signal set to contain all of the known signals. |
| 39 | One of these routines must be used to initialize a signal set |
| 40 | before its use by the other functions. |
| 41 | .Pp |
| 42 | The |
| 43 | .Fn sigaddset |
| 44 | function adds a specified signal |
| 45 | .Fa signo |
| 46 | to a signal set. |
| 47 | The |
| 48 | .Fn sigdelset |
| 49 | function deletes a specified signal |
| 50 | .Fa signo |
| 51 | from a signal set. |
| 52 | .Pp |
| 53 | The |
| 54 | .Fn sigismember |
| 55 | function tests whether a specified signal |
| 56 | .Fa signo |
| 57 | is contained in a signal set. |
| 58 | .Sh RETURN VALUES |
| 59 | The |
| 60 | .Fn sigismember |
| 61 | function returnes 1 |
| 62 | if the signal is a member of the set, |
| 63 | a 0 otherwise. |
| 64 | The other functions return 0 upon success. |
| 65 | A \-1 return value |
| 66 | indicates an error occurred and the global variable |
| 67 | .Va errno |
| 68 | is set to indicated the reason. |
| 69 | The current implementation does not detect any errors. |
| 70 | .Sh ERRORS |
| 71 | These functions could fail if one of the following occurs: |
| 72 | .Bl -tag -width [EINVAL] |
| 73 | .It Bq Er EINVAL |
| 74 | .Fa signo |
| 75 | has an invalid value. |
| 76 | .El |
| 77 | .Sh SEE ALSO |
| 78 | .Xr kill 2 , |
| 79 | .Xr sigaction 2 , |
| 80 | .Xr sigsetops 2 , |
| 81 | .Xr sigsuspend 2 |
| 82 | .Sh STANDARDS |
| 83 | The |
| 84 | These functions are defined by |
| 85 | .St -p1003.1-88 . |
| 86 | .Sh HISTORY |
| 87 | These functions are |
| 88 | .Ud . |