Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_sigmask(2) [osx man page]

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 LIBRARY
POSIX Threads Library (libpthread, -lpthread) SYNOPSIS
#include <pthread.h> #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. SEE ALSO
sigaction(2), sigpending(2), sigprocmask(2), sigsuspend(2), sigsetops(3) STANDARDS
The pthread_sigmask() function conforms to ISO/IEC 9945-1:1996 (``POSIX.1'') BSD
February 19, 2011 BSD
Man Page

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Round Robin Scheduling

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

2. Programming

What is the difference between f(...), f(void) and f()

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)
Discussion started by: purplelightspar
2 Replies

3. UNIX for Advanced & Expert Users

capturing synchronous signals

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

4. Programming

why multiple SIGINT raises when i hit C-c

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)
Discussion started by: Sedighzadeh
1 Replies

5. Programming

SIGCHLD interrupts its own handler

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)
Discussion started by: jrichemont
3 Replies

6. Programming

Unable to create a UDP client from thread?

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)
Discussion started by: sehang
3 Replies

7. Programming

Thread parameter in ANSI C makes a segmentation fault

The creation of thread. void Client_Constructor ( const char* IPAddr ) { pthread_t tid; pthread_attr_t rx; /* Create separate memory for client argument */ struct ThreadArgs *threadArgs; if ( ( threadArgs = ( struct ThreadArgs* ) malloc( sizeof( struct ThreadArgs )... (14 Replies)
Discussion started by: sehang
14 Replies

8. Programming

Losing signal problem

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)
Discussion started by: DendyGamer
5 Replies