Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 2009 18:29:12 +0000
From:      "Robert N. M. Watson" <rwatson@FreeBSD.org>
To:        Colin Percival <cperciva@freebsd.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r198781 - head/lib/libc/sys
Message-ID:  <BB1AB2EC-C264-4B82-B24C-2ACD34AB7A54@FreeBSD.org>
In-Reply-To: <4AEF22E3.5070701@freebsd.org>
References:  <200911020721.nA27LDq1048764@svn.freebsd.org> <alpine.BSF.2.00.0911021455080.37561@fledge.watson.org> <4AEF22E3.5070701@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 2 Nov 2009, at 18:20, Colin Percival wrote:

>> I think a more general caution for accept(2) might instead be:
>>
>> BUGS
>>    The inheritence of socket options from a listen socket to a newly
>>    accepted socket is inconsistent across protocols, and non- 
>> portable.
>
> I was originally going to write it that way, but when I looked at the
> existing text I saw that it only mentioned inheriting O_NONBLOCK and  
> said
> nothing about other options -- so I figured that it was appropriate to
> follow suit and only mention O_NONBLOCK in saying what was non- 
> portable.

We preserve a number of socket options and other properties across  
accept(2), but not all. For example, we do preserve most socket-level  
options, linger state, routing fib number, and socket buffer sizing/ 
watermarks, as well as many connection properties such as TCP_NODELAY.  
However, if history is anything to go by, we also fail to preserve  
quite a few properties, and we've had a number of bug fixes over the  
years topping up the list of things inherited over accept.

Robert



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BB1AB2EC-C264-4B82-B24C-2ACD34AB7A54>