This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
pthreads and poll
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: pthreads and poll
- From: kd at flaga dot is
- Date: Thu, 20 Jan 2000 16:32:40 +0000
- Cc: mu at flaga dot is, bug-glibc at gnu dot org
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
Hi,
According to the man page for poll() it says it should return EINTR if a
signal occurred before any of the requested poll events happened.
Now I have the following threads,
1) threadA is sleeping in poll
2) threadB signals a condition variable
As I understand, pthreads on linux use unix signals to signal threads
although abstracted by pthreads.
So my questions:
1) Is it a bug that threadA (the one sleeping on poll) is not "interrupted"
when a pthreads signal occurred?
2) If not, how can I make sure that threadA is woken up (interrupted) when
a pthread signal occurred?
K.D.
P.S. I can send a program that demostrates this if desired.