Bruno Haible wrote:
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.
It's much worse than that. On some other kinds of descriptor, recv
works, but ignores MSG_PEEK!
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
- Re: [bug-gnulib] poll(2) emulation doesn't work well on a fi... Paolo Bonzini
-