Re: POLLRDONCE optimisation for epoll users (was: epoll and half closed TCP connections)

From: Davide Libenzi (davidel@xmailserver.org)
Date: Sun Jul 13 2003 - 22:17:50 EST


On Mon, 14 Jul 2003, Jamie Lokier wrote:

> Jamie Lokier wrote:
> > (e) there is urgent data with OOBINLINE (I think)
>
> To be more precise, using the POLLRDHUP patch as-is, if someone sends
> your program some data, then an URGent segment, then a FIN with
> optional data in between, your program won't notice the second data or
> FIN and will fail to clean up the socket.

And why ? To me it looks fairly simple. When the FIN is received a wakeup
is done on the poll wait list and the following f_op->poll will fetch the
RDHUP flag. Then the next epoll_wait() will fetch the event and will have
all the info it needs to do things correctly.

- 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 : Tue Jul 15 2003 - 22:00:49 EST