|
From: | Paolo Bonzini |
Subject: | Re: [bug-gnulib] poll(2) emulation doesn't work well on a file descriptor |
Date: | Sat, 12 Aug 2006 10:34:21 +0200 |
User-agent: | Thunderbird 1.5.0.5 (Macintosh/20060719) |
Bruno Haible wrote:
It's much worse than that. On some other kinds of descriptor, recv works, but ignores MSG_PEEK!Daiki Ueno wrote:When I tried a tiny program which uses gnulib's poll(2) emulation on MacOS X 10.4, I found a bug. gnulib's poll(2) uses recv(2) with MSG_PEEK to support POLLHUP. However, recv(2) is only applicable to a socket, not to a file descriptor.
I have a similar patch using FIONREAD instead of recv for Mac OS only, but the bottom line is that you cannot rely on POLLHUP for Mac OS :-( I'll polish the patch and send it soon.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |