Re: epoll vs stdin/stdout

From: Eric Varsanyi (
Date: Tue Jul 08 2003 - 11:02:06 EST

On Tue, Jul 08, 2003 at 08:42:29AM -0700, Davide Libenzi wrote:
> It is not that events are delivered per-fd. If 3 and 4 refer to the same
> file* and you register both 3 and 4 with EPOLLIN, you'll get two events if
> an EPOLLIN happen. One for 3 and one for 4.

Agreed 100%, this is roughly what would happen with select() as well which
IMO is good (not surprising behaviour) for event loop writers: it would
return with both bits set. The EEXIST we were getting before this patch
would be analogous to select() returning an error if you set 2 bits that
where for fd's sharing an object (even across read/write bit vectors).
One could argue at the logic of having 2 fd's get read events on a
shared underlying object, but one read and the other write certainly
makes sense as discussed earlier.
Thanks again,
-Eric Varsanyi
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 15 2003 - 22:00:27 EST