[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sigwait + pthread doesn't work
From: |
Manfred Spraul |
Subject: |
Re: sigwait + pthread doesn't work |
Date: |
Mon, 16 Apr 2001 10:18:18 +0200 |
From: "Manfred Spraul" <address@hidden>
>
> The attachment contains the test app, Makefile and 2 strace dumps
> (without -lpthread, with -lpthread)
>
Just in case you were scared of by the .tar.gz: I've shrinked the test
case down to 27 lines and probably found the bugs:
linuxthreads/signals.c:
- for(; i <= NSIG;)
+ for(;i < NSIG;)
This caused the rt_sigaction(64,,,)
- sigemptyset(&sa.sa_mask);
+ sigfillset(&sa.sa_mask);
sigwait should return one signal, and without blocking concurrent
signals a second signal is delivered, and the first one is lost.
I've attached the simpler test case and an untested bugfix.
--
Manfred
patch-untested
Description: Binary data
iptest.cpp
Description: Binary data