sigsetops(3) Library Functions Manual sigsetops(3)Name
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - manipulate signal sets (POSIX)
Syntax
#include <signal.h>
int sigemptyset(set)
sigset_t *set;
int sigfillset (set)
sigset_t *set;
int sigaddset(set,sig)
sigset_t *set;
int sig;
int sigdelset(set,sig)
sigset_t *set;
int sig;
int sigismember(set,sig)
sigset_t *set;
int sig;
Description
The functions manipulate signal sets used by the other POSIX signal functions
The function initializes the signal set pointed to by the argument set so that all signals are excluded.
The function initializes the signal set pointed to by the argument set so that all signals are included.
The and functions respectively add and delete the individual signal specified by the value of the argument sig from the signal set pointed
to by the argument set.
The function tests whether the signal specified by the value of the argument sig is a member of the set pointed to by the argument set.
Return Values
Upon successful completion, the function returns a value of 1 if the specified signal is a member of the set. If it is not a member of the
set, a value of 0 is returned.
If the or functions fail a -1 value is returned and errno is set to indicate the reason.
Diagnostics
The function will fail and the signal mask will remain unchanged if one of the following occur:
[EINVAL] The value of the sig argument is not a valid signal number
See Alsosigprocmask(3), sigaction(3), sigsuspend(3), sigpending(2)sigsetops(3)
Check Out this Related Man Page
sigsetops(3) Library Functions Manual sigsetops(3)Name
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember - manipulate signal sets (POSIX)
Syntax
#include <signal.h>
int sigemptyset(set)
sigset_t *set;
int sigfillset (set)
sigset_t *set;
int sigaddset(set,sig)
sigset_t *set;
int sig;
int sigdelset(set,sig)
sigset_t *set;
int sig;
int sigismember(set,sig)
sigset_t *set;
int sig;
Description
The functions manipulate signal sets used by the other POSIX signal functions
The function initializes the signal set pointed to by the argument set so that all signals are excluded.
The function initializes the signal set pointed to by the argument set so that all signals are included.
The and functions respectively add and delete the individual signal specified by the value of the argument sig from the signal set pointed
to by the argument set.
The function tests whether the signal specified by the value of the argument sig is a member of the set pointed to by the argument set.
Return Values
Upon successful completion, the function returns a value of 1 if the specified signal is a member of the set. If it is not a member of the
set, a value of 0 is returned.
If the or functions fail a -1 value is returned and errno is set to indicate the reason.
Diagnostics
The function will fail and the signal mask will remain unchanged if one of the following occur:
[EINVAL] The value of the sig argument is not a valid signal number
See Alsosigprocmask(3), sigaction(3), sigsuspend(3), sigpending(2)sigsetops(3)
Hello,
i am using the sigaction function to handle the SIGCHLD signal.Is it possible to use a class member function as the handler function (the sa_handler member of the sigaction structure)?
The function's signature is:
void (*sa_handler)(int);so i don't think i can use a static member function... (2 Replies)
I know how to add signal to a set. But what if I want to add 2 or 3 signals to the set.
I know I can use sigaddset (&set,SIGBUS)....but what if I want to add SIGBUS and SIGALRM at once. Do i have to do it like this..
sigaddset (&set,SIGBUS);
sigaddset (&set,SIGALRM);
Is there another way to... (0 Replies)