netdev
[Top] [All Lists]

Re: shutdown() and SHUT_RD on TCP sockets - broken?

To: mtk-lists@xxxxxxx
Subject: Re: shutdown() and SHUT_RD on TCP sockets - broken?
From: Andi Kleen <ak@xxxxxxx>
Date: Wed, 9 Jul 2003 12:38:10 +0200
Cc: kuznet@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <27451.1057745479@xxxxxxxxxxxx>
References: <27451.1057745479@xxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
On Wed, 9 Jul 2003 12:11:19 +0200 (MEST)
mtk-lists@xxxxxxx wrote:

.
> 
> > From viewpoint of TCP the behaviour described in Stevens' book
> > is highly unnatural. SHUT_RD on TCP does not make any sense.
> 
> A while back I had some communication with Andi Kleen on this point,
> and he suggested that the TCP could send an RST in this case, much 

Linux sends an RST when data arrives that the  user cannot read anymore 
because the receiving socket is already closed. It would make sense to extend
this behaviour to SHUT_RD. But there is no natural place to implement it
outside the fast path, and it's so obscure that it is not worth slowing
common cases down.

-Andi

<Prev in Thread] Current Thread [Next in Thread>