Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sigaddset(3) [osx man page]

SIGSETOPS(3)						   BSD Library Functions Manual 					      SIGSETOPS(3)

NAME
sigaddset, sigdelset, sigemptyset, sigfillset, sigismember -- manipulate signal sets LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <signal.h> int sigaddset(sigset_t *set, int signo); int sigdelset(sigset_t *set, int signo); int sigemptyset(sigset_t *set); int sigfillset(sigset_t *set); int sigismember(const sigset_t *set, int signo); DESCRIPTION
These functions manipulate signal sets, stored in a sigset_t. Either sigemptyset() or sigfillset() must be called for every object of type sigset_t before any other use of the object. The sigemptyset() function initializes a signal set to be empty. The sigfillset() function initializes a signal set to contain all signals. The sigaddset() function adds the specified signal signo to the signal set. The sigdelset() function deletes the specified signal signo from the signal set. The sigismember() function returns whether a specified signal signo is contained in the signal set. These functions are provided as macros in the include file <signal.h>. Actual functions are available if their names are undefined (with #undef name). RETURN VALUES
The sigismember() function returns 1 if the signal is a member of the set, 0 otherwise. The other functions return 0. ERRORS
Currently, no errors are detected. SEE ALSO
kill(2), sigaction(2), sigsuspend(2) STANDARDS
These functions are defined by IEEE Std 1003.1-1988 (``POSIX.1''). BSD
June 4, 1993 BSD

Check Out this Related Man Page

SIGSETOPS(3)						   BSD Library Functions Manual 					      SIGSETOPS(3)

NAME
sigaddset, sigdelset, sigemptyset, sigfillset, sigismember -- manipulate signal sets LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <signal.h> int sigaddset(sigset_t *set, int signo); int sigdelset(sigset_t *set, int signo); int sigemptyset(sigset_t *set); int sigfillset(sigset_t *set); int sigismember(const sigset_t *set, int signo); DESCRIPTION
These functions manipulate signal sets, stored in a sigset_t. Either sigemptyset() or sigfillset() must be called for every object of type sigset_t before any other use of the object. The sigemptyset() function initializes a signal set to be empty. The sigfillset() function initializes a signal set to contain all signals. The sigaddset() function adds the specified signal signo to the signal set. The sigdelset() function deletes the specified signal signo from the signal set. The sigismember() function returns whether a specified signal signo is contained in the signal set. These functions are provided as macros in the include file <signal.h>. Actual functions are available if their names are undefined (with #undef name). RETURN VALUES
The sigismember() function returns 1 if the signal is a member of the set, 0 otherwise. The other functions return 0. ERRORS
Currently, no errors are detected. SEE ALSO
kill(2), sigaction(2), sigsuspend(2) STANDARDS
These functions are defined by IEEE Std 1003.1-1988 (``POSIX.1''). BSD
June 4, 1993 BSD
Man Page

10 More Discussions You Might Find Interesting

1. Solaris

What is the replace of system call sigblock on sunOS 5.10

Hi: I have some old code need to be compiled - which include a system call, the function name is: sigblock like: ..... int holdnum = sigblock(sigmask(SIGCHLD)); .... but the compiler told me the sigblock cannot be found even I include signal.h. Looks like it is depricated - but I need to... (1 Reply)
Discussion started by: sean88z
1 Replies

2. UNIX for Dummies Questions & Answers

Help understanding signals

I am having trouble with folowing sigset_t s; // now s represents set of signals sigemptyset(&s) ; // initialize this set and exclude all the signals from it.is it empty? sigaddset(&s,SIGILL);//this set containts only SIGILL signal sigprocmask(SIG_BLOCK,&s,NULL);//lost on this one Can... (3 Replies)
Discussion started by: joker40
3 Replies

3. UNIX for Dummies Questions & Answers

Trying to block signal

I have this code that doesnt do what it is suppose to do. It should block signal that I send while process is running. I press control+z while this process is running and it should be blocked but it isnt. When i press control+z it gives me this.... + Stopped When I change SIGTSP into SIGINT then... (5 Replies)
Discussion started by: joker40
5 Replies

4. UNIX for Dummies Questions & Answers

perror with signals

I have following problem with this code.. First time trough the main loop..... perror gives ....blocked signal:success(all other times gives illlegal seek) Should every time trought the main loop be success?? And the perror otside of main loop...didn't change mask:success That line of code... (2 Replies)
Discussion started by: joker40
2 Replies

5. UNIX for Dummies Questions & Answers

Blocking signals

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)
Discussion started by: joker40
0 Replies

6. UNIX for Dummies Questions & Answers

pending signals

I was wondering about following. If I have set of 3 signals. And they are all blocked.Now at some point in the program the set is unblocked. Which signal will be delivered first.This is my set....SIGTSTP,SIGQUIT,SIGINT.When I added them in the set and unblock them I did it in following order... ... (1 Reply)
Discussion started by: joker40
1 Replies

7. Programming

Question about system command in C

The man system says During execution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT will be ignored. What does this mean? And if i am making a function that does what system does how do i write this signal stuff? (19 Replies)
Discussion started by: omega666
19 Replies

8. Programming

TCP connection check

Hi. I am writing client - server application using TCP sockets. I need some very basic functionality, namely: how to check if another "participant" of the connection is still present? I want to handle situations, when client is gone, or server breaks down, etc. (25 Replies)
Discussion started by: Shang
25 Replies

9. Programming

[C/Linux]Help in replacing obsolete function

Hi guys, I need help on some function replacement cause I get obsolete function warning(and I must remove it): -gethostbyaddr(arg1,arg2,arg3) -gethostbyname(arg1) -getservbyname(arg1,arg2) can be replaced with getaddrinfo(arg1,arg2,arg3,arg4) but I'm not able to undestand how(libraries... (0 Replies)
Discussion started by: fracche
0 Replies

10. Programming

Nanosleep in signal call

Hi @ll :) I have a problem with my code but first a short description: 1. I have one signal call SIGUSR1 2. In the signal I try to use nanosleep and now: When I put kill -SIGUSR1 pid --> sometimes works fine, sometimes returns me an error with ,,Interrupt system call", sometimes I got... (5 Replies)
Discussion started by: mattdj
5 Replies