Re: epoll vs stdin/stdout

From: Davide Libenzi (davidel@xmailserver.org)
Date: Mon Jul 07 2003 - 19:32:17 EST


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/



This archive was generated by hypermail 2b29 : Mon Jul 07 2003 - 22:00:31 EST