A problem with poll
Jose-Marcio.Martins_at_ensmp.fr
Date: 05/20/04
- Previous message: Ulf Zimmermann: "Problem with a 5.2.1 system and downloading"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 20 May 2004 21:52:53 +0200 To: freebsd-hackers@freebsd.org
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:Jose-Marcio.Martins@ensmp.fr _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Ulf Zimmermann: "Problem with a 5.2.1 system and downloading"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|