chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] Fix for poll() "special" values in revent


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Fix for poll() "special" values in revent
Date: Tue, 26 Feb 2013 19:02:26 +0100
User-agent: Mutt/1.4.2.3i

Hi all,

Here's a patch to deal with "special" situations in poll().  Mario found a
problem on Linux:
http://paste.call-cc.org/paste?id=c01e9dfcce2f56e88be143a01c6c4fb0bf1bec25
I think this is due to the change described here:
http://lkml.indiana.edu/hypermail/linux/kernel/0103.1/0711.html

In any case, we don't check poll() revents for any other values than
POLLIN/POLLOUT, which is clearly wrong; if a pipe is closed, there's
nothing to read, but it will be POLLHUP'ed.  Apparently on non-Linux
this generally won't be signalled like this (except maybe in some
situations), which is why this wasn't noticed before.

I nominate this patch for inclusion in the stability branch.

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: 0001-When-checking-whether-an-FD-is-ready-for-input-or-ou.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]