While converting old code using select(2) to use poll(2), its deployment on Solaris 10 SPARC machine did show that Solaris does return (in revents) POLLEOF without POLLIN if the file (socket) is in read-EOF condition. Linux 2.6.15 does return POLLIN even for EOF cases. Does it return it WITH the POLLEOF flag ? That was not looked for. I can't entirely blame Linux for returning this result -- it is very convenient for conversion from select() to poll(), after all, but being a mismatch against Solaris, code portability issues raised their ugly head.. Nor can I say what happens at latter kernel versions.
There's NO POLLEOF flag on Linux. It's Solaris-specific it seems.
Matti, if you are still interested in such semantics, maybe you can elaborate what the flag is for in read-EOF condition. Maybe it will be possible to map this case to Linux functionality and explain the difference.