PTHREAD_SIGMASK(2) BSD System Calls Manual PTHREAD_SIGMASK(2)NAME
pthread_sigmask -- examine and/or change a thread's signal mask
SYNOPSIS
#include <signal.h>
int
pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict oset);
DESCRIPTION
The pthread_sigmask() function examines and/or changes the calling thread's signal mask.
If set is not NULL, it specifies a set of signals to be modified, and how specifies what to set the signal mask to:
SIG_BLOCK Union of the current mask and set.
SIG_UNBLOCK Intersection of the current mask and the complement of set.
SIG_SETMASK set.
If oset is not NULL, the previous signal mask is stored in the location pointed to by oset.
SIGKILL and SIGSTOP cannot be blocked, and will be silently ignored if included in the signal mask.
RETURN VALUES
If successful, pthread_sigmask() returns 0. Otherwise, an error is returned.
ERRORS
pthread_sigmask() will fail if:
[EINVAL] how is not one of the defined values.
LEGACY SYNOPSIS
#include <pthread.h>
#include <signal.h>
The include file <pthread.h> is necessary.
SEE ALSO sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2), sigsetops(3), compat(5)STANDARDS
pthread_sigmask() conforms to ISO/IEC 9945-1:1996 (``POSIX.1'')
BSD April 27, 2000 BSD
Check Out this Related Man Page
PTHREAD_SIGMASK(3) BSD Library Functions Manual PTHREAD_SIGMASK(3)NAME
pthread_sigmask -- examine and/or change a thread's signal mask
SYNOPSIS
#include <signal.h>
int
pthread_sigmask(int how, const sigset_t * restrict set, sigset_t * restrict oset);
DESCRIPTION
The pthread_sigmask() function examines and/or changes the calling thread's signal mask.
If set is not NULL, it specifies a set of signals to be modified, and how specifies what to set the signal mask to:
SIG_BLOCK Union of the current mask and set.
SIG_UNBLOCK Intersection of the current mask and the complement of set.
SIG_SETMASK set.
If oset is not NULL, the previous signal mask is stored in the location pointed to by oset.
SIGKILL and SIGSTOP cannot be blocked, and will be silently ignored if included in the signal mask.
RETURN VALUES
If successful, pthread_sigmask() returns 0. Otherwise, an error is returned.
ERRORS
The pthread_sigmask() function will fail if:
[EINVAL] how is not one of the defined values.
LEGACY SYNOPSIS
#include <pthread.h>
#include <signal.h>
The include file <pthread.h> is necessary.
SEE ALSO sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2), sigsetops(3), compat(5)STANDARDS
pthread_sigmask() conforms to ISO/IEC 9945-1:1996 (``POSIX.1'')
BSD February 19, 2011 BSD
Hi, first post. Well, here goes:
Ok, so I need to build a round robin scheduling algorithm. I understand HOW the algorithm works and I can write it down/show you on paper if you were to ask me "how does the RR scheduling algorithm work?"
Only problem is that I'm having a hell of a time... (0 Replies)
What is the difference between f(...) , f(void),f()
I know that f(void) doesn't take any parameters, but what about f() and f(...) Does the last call of function even exists? (2 Replies)
hi,
i created 2 threads in which one thread is dedicated to capture signals and handle them.
i used the following functions:
sigfillset for filling the signal set to be blocked by other threads
sigwait for waiting on particular signals
pthread_sigmask to mask block the signals.
I... (0 Replies)
hi,
in my application, i have set up to capture SIGINT and execute a handler.the problem is whenever i hit C-c, multiple SIGINT are sent to the application.I have blocked the SIGINT right after catching the first one but it is unsuccessful.Here is what i do :
jmp_buf main_loop;
int... (1 Reply)
Hi. I have a program whose job it is to manage 15 child processes. Sometimes these children die (sometimes deliberately other times with a SEGV). This causes a SIGCHLD to be sent to my program which uses waitpid() in the signal handler to gather information and, in most cases, restart the child.... (3 Replies)
I try to initial a UDP client from threading, but it doesn't work? why?
These codes from the textbook
#define ECHOMAX 255 /* Longest string to echo */
#define TIMEOUT_SECS 2 /* Seconds between retransmits */
#define MAXTRIES 5 /* Tries before giving up */... (3 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)