Re: epoll vs stdin/stdout

Davide Libenzi (davidel@xmailserver.org)
Mon, 7 Jul 2003 17:32:17 -0700 (PDT)


On Tue, 8 Jul 2003, Jamie Lokier wrote:

> Davide Libenzi wrote:
> > Try out this one, either over 2.5.74 or over an existing epoll-patched
> > 2.4.{20,21} ...
>
> Sorry, can't try it out.
> But I have a question anyway :)
>
> Does this correctly free everything when you:
>
> declare interest in some events on fd 3
> dup2(3,4)
> close(3)
> ?

Neither the old and the new code does it. Cleanup is done either with an
EPOLL_CTL_DEL (explicitly) or with the file* removal (__fput()). In you
case when you close(4) if you do not do it explicitly.

- 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/