SIGSETOPS(3) BSD Library Functions Manual SIGSETOPS(3)NAME
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember -- manipulate signal sets
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <signal.h>
int
sigemptyset(sigset_t *set);
int
sigfillset(sigset_t *set);
int
sigaddset(sigset_t *set, int signo);
int
sigdelset(sigset_t *set, int signo);
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.
RETURN VALUES
The sigismember() function returns 1 if the signal is a member of the set, 0 otherwise. The other functions return 0 upon success. A -1
return value indicates an error occurred and the global variable errno is set to indicate the reason.
ERRORS
These functions could fail if one of the following occurs:
[EINVAL] signo has an invalid value.
SEE ALSO kill(2), sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)STANDARDS
These functions are defined by IEEE Std 1003.1-1988 (``POSIX.1'').
BSD December 16, 2004 BSD
Check Out this Related Man Page
SIGSETOPS(3) BSD Library Functions Manual SIGSETOPS(3)NAME
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember -- manipulate signal sets
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <signal.h>
int
sigemptyset(sigset_t *set);
int
sigfillset(sigset_t *set);
int
sigaddset(sigset_t *set, int signo);
int
sigdelset(sigset_t *set, int signo);
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.
RETURN VALUES
The sigismember() function returns 1 if the signal is a member of the set, 0 otherwise. The other functions return 0 upon success. A -1
return value indicates an error occurred and the global variable errno is set to indicate the reason.
ERRORS
These functions could fail if one of the following occurs:
[EINVAL] signo has an invalid value.
SEE ALSO kill(2), sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2)STANDARDS
These functions are defined by IEEE Std 1003.1-1988 (``POSIX.1'').
BSD December 16, 2004 BSD
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)
My program has two threads, one is for sender and another one is receiver,
The receiver loop forever and accept and receive data from sender.
The sender may send message if necessary and terminated when the job finished (I create a new thread when new service is needed).
Now I... (7 Replies)
Hi,
I have a UDP server and client program, and they must run within a program, so I decided two threads, one for UDP server and another for UDP client.
The simple architecture is shown in attachment.
However, I can't send the packets out on the UDP client, no any time message and... (2 Replies)
Hi all,
Sorry about the title,at first i decided to ask a problem about the signal mechanism,however,i'm now figured it out.Sorry to forget modify the title:wall:.I had a small problem that if i use the code which is commented,the code would get a segment fault,while the above code NOT.what's... (4 Replies)
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)
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)
HI
Can anyone provide me with codes for file transfer server to client or vice versa?
Also please explain how to compile those programs in ubuntu terminal as i am totally new to socket programming.
Thanks (1 Reply)
Dear shell experts,
I spent last few days porting ksh script from ksh88/SunOS to ksh93/Linux.
Basically, things are going well and I do not have too much troubles porting ks88 script to ksh93, but I stuck on one item. It's about sending and handling the signal.
I found two similar... (8 Replies)
I'm newbie in UNIX programming, I have a problem with signals. I'm writing multithread program, where threads can die at any moment. When thread dies it generates signal SIGUSR1 to main thread and then thread dies. Main thread gets a signal and waits for thread dead.
I wrote program like this:
... (5 Replies)
I am having exactly the same problem with https://www.unix.com/programming/129264-application-cleanup-during-linux-shutdown.html but the thread is old and closed. The only difference is that I use sigaction() instead of signal(), which is recommended, as far as I know.
This is my code:
... (9 Replies)
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)