This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

pthreads and poll


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]