Hello,

I'm using a pipe to communicate between threads in the same process.

In fact, I've a thread waiting (using poll) for data available on some set of file descriptors.

From time to time I need to interrupt the poll call in order to add a new file descriptor. I do this with the pipe.

I add p[0] to the poll set and I write to p[1] when I want to interrupt the poll call.

The problem is that poll returns as expected, but the read on the file descriptor blocks.

Before the poll call, I set events flags to POLLIN | POLLPRI. When poll returns, events is set to POLLIN [ POLLPRI, and revents is 0. Value returned by poll is the good number of file descriptors ready.

What I'm doing wrong ?

Thanks for your help

Joe


-- --------------------------------------------------------------- Jose Marcio MARTINS DA CRUZ Tel. :(33) 01.40.51.93.41 Ecole des Mines de Paris http://j-chkmail.ensmp.fr 60, bd Saint Michel http://www.ensmp.fr/~martins 75272 - PARIS CEDEX 06 mailto:[EMAIL PROTECTED]


_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to