lkml.org 
[lkml]   [2003]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: epoll vs stdin/stdout
On Mon, 7 Jul 2003, Eric Varsanyi wrote:

> It seems reasonable to register for read events on stdin and write events
> on stdout. In an earlier posting on the epoll API it was asserted that
> anyone registering for events on 2 fd's that shared the same file * was
> asking for trouble.
>
> I can imagine many apps that might want to proxy async traffic thru
> stdin/stdout, what is the intended general solution for this with epoll?
>
> FWIW in my app I'm just assuming that fd0 is a dup of fd1 if EPOLL_CTL_ADD
> on fd1 fails with EEXISTS, then I EPOLL_CTL_MOD on fd0 to add the write event.
> This seems like a bit of a hack tho.

Events caught by epoll comes from a file* since that is the abstraction
the kernel handles. Events really happen on the file* and there's no way
if you dup()ing 1000 times a single fd, to say that events are for fd = 122.



- Davide

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.078 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site