poll() behaves differently in Linux 2.4.1 vs. Linux 2.2.14 (POLLHUP)
Quoted 7 lines · Alexy
Quoted 7 lines
Damn, we did not test behaviour on absolutely new clean never connected socket... Solaris really may return 0 on it.
However, looking from other hand the issue looks as absolutely academic and not related to practice in any way.
Hi,
I'm not sure this issue is really that academic. In
fact, it's one of those nitty-gritty, annoying details that academics tend to ignore :). Anyway, I'm looking at this from a very pragmatic standpoint. I'd like to minimize the complexity and the number of special cases when trying to support an application on several different platforms. If other popular Unix OS's behave this way I definely understand the reasoning, but it seems that at least Solaris 7 does not... Sure, workarounds exist, but they just complicates things.
-jeff
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
Hello!
Quoted 2 lines
Sure, workarounds exist, but they just complicates things.
Working around --- what?
An example of application hitting the case is enough to make me completely agreed.
But genarally we are not going to match any os and even yourselves yesterday or tomorrow in the cases when behaviour is truly undefined and the answer is meaningless. For me any solution from retunring 0 or returning POLLHUO to killing offending application or generating an answer using random number generator look equally good, acceptable and 100% compatible in this case. 8)
Alexey