From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:29:16 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B22C4106568B; Mon, 2 Nov 2009 18:29:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8B1948FC19; Mon, 2 Nov 2009 18:29:16 +0000 (UTC) Received: from [192.168.2.101] (host217-43-176-60.range217-43.btcentralplus.com [217.43.176.60]) by cyrus.watson.org (Postfix) with ESMTPSA id CCD7F46B06; Mon, 2 Nov 2009 13:29:14 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: "Robert N. M. Watson" In-Reply-To: <4AEF22E3.5070701@freebsd.org> Date: Mon, 2 Nov 2009 18:29:12 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <200911020721.nA27LDq1048764@svn.freebsd.org> <4AEF22E3.5070701@freebsd.org> To: Colin Percival X-Mailer: Apple Mail (2.1076) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r198781 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2009 18:29:16 -0000 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