Re: pthreads and signals



On 9 Apr 2007 20:35:57 -0700, bharat1478@xxxxxxxxx wrote:

Hi,
I am using pthreads in linux (Fedora Core 6). I know that each
thread in a process can have its own signal mask. Lets say thread A
masks SIGIO and threads B doesn't. Also lets say there is a signal
handler for SIGIO for the process. Now does that mean SIGIO may/may
not be delivered to the process depending on which thread is
scheduled ? I may be lacking some information here or maybe wrong
conceptually to start with. Any help would be appreciated.

Bharat,

The signal will only be delivered to (and handled by) one of the
threads that is not blocking the signal. i.e., in your case it will
always be delivered to thread B.

Cheers,

Michael
.



Relevant Pages

  • pthreads and signals
    ... I am using pthreads in linux (Fedora Core 6). ... thread in a process can have its own signal mask. ... masks SIGIO and threads B doesn't. ...
    (comp.programming.threads)
  • RFReview: remove aync IO from yppush
    ... unsafe and unnecessary use of asynchronous I/O (F_ASYNC, SIGIO) on RPC ... single outgoing job and with multiple parallel jobs, ... * Special handler for asynchronous socket I/O. ... * sockets of the callback handlers as O_ASYNC and handle SIGIO ...
    (freebsd-net)
  • Re: pthreads and signals
    ... thread in a process can have its own signal mask. ... masks SIGIO and threads B doesn't. ... The signal may in fact change the ... scheduling. ...
    (comp.programming.threads)
  • Re: Assigning privs to a program?
    ... Joerg Schilling wrote: ... > as sigset defiinitely adds the signal to the signal mask so the ... > same signal may not be catched while a signal handler is active. ... They need not even reestablish the handler inside the handler with ...
    (comp.unix.programmer)
  • Re: Assigning privs to a program?
    ... Joerg Schilling wrote: ... > as sigset defiinitely adds the signal to the signal mask so the ... > same signal may not be catched while a signal handler is active. ... They need not even reestablish the handler inside the handler with ...
    (comp.unix.solaris)