[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nptl] Re: [offtopic] NPTL question
Hello Bharath,
> Sorry to diverge from the main purpose of this mailing list. I have a
> question, which basically could question my understanding of POSIX
> threads in general. If this is the wrong mailing list would really
> appreciate if you could direct me to a better list where I could post my
> question.
If you have question about POSIX threads in general, the appropriate
newsgroup is comp.programming.threads.
> Question is as follows:
> I have signal say SIGRTMIN which I have blocked in all the threads that
> I create. I do this by using sigprocmask before I fire my threads. I
> have a thread which handles SIGRTMIN without explicitly using a
> sigaction. Since I blocked the signal SIGRTMIN, I assume that it would
> be in the pending queue for delivery. I use sigwaitinfo to dequeue the
> signal in the appropriate thread by looping infinitely. I find that I am
> unable to dequeue the signal inside my thread, but I am able to dequeue
> the same signal in the main process that fires off all the threads. Is
> this the behavior of POSIX threads or my understanding is correct and
> this is a bug in the implementation of NPTL or is a bug in the Linux
> kernel which causes this to happen.
Perhaps this is not the reason of your problem, but I see at least one
mistake from a POSIX viewpoint. The XSH sigprocmask() is only well defined
for single-threaded process. For multi-threaded process, you should use
pthread_sigmask() instead.
Let see if that correct your problem. If not, we shall investigate your
problem further ( if you are sending SIGRTMIN to your process, your
expectations are correct and the behavior you are describing seems to
indicate a bug).
HTH,
Loic.
--
--
// Sender address goes to /dev/null (!!)
// Use my 32/64 bits, ANSI C89, compliant email-address instead:
unsigned y[]=
{0,34432,26811,16721,41866,63119,61007,48155,26147,10986};
void x(z){putchar(z);}; unsigned t;
main(i){if(i<10){t=(y[i]*47560)%65521;x(t>>8);x(t&255);main(++i);}}
"Happy ProMail" bis 24. März: http://www.gmx.net/de/go/promail
Zum 6. Geburtstag gibt's GMX ProMail jetzt 66 Tage kostenlos!
--
"Happy ProMail" bis 24. März: http://www.gmx.net/de/go/promail
Zum 6. Geburtstag gibt's GMX ProMail jetzt 66 Tage kostenlos!
Liste de diffusion nptl
Pour se désinscrire : mailto:nptl_request@bullopensource.org?subject=unsubscribe