From owner-svn-src-all@FreeBSD.ORG Mon Nov 2 18:55:05 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 861AE106568B for ; Mon, 2 Nov 2009 18:55:05 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id F09478FC1B for ; Mon, 2 Nov 2009 18:55:04 +0000 (UTC) Received: from vampire.homelinux.org (dslb-088-067-242-013.pools.arcor-ip.net [88.67.242.13]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MEaVh-1My8BK2Smv-00FwbL; Mon, 02 Nov 2009 19:55:03 +0100 Received: (qmail 75869 invoked from network); 2 Nov 2009 18:55:02 -0000 Received: from kvm.laiers.local (HELO kvm.localnet) (192.168.4.188) by laiers.local with SMTP; 2 Nov 2009 18:55:02 -0000 From: Max Laier Organization: FreeBSD To: Colin Percival Date: Mon, 2 Nov 2009 19:55:02 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.31-ARCH; KDE/4.3.2; x86_64; ; ) References: <200911020721.nA27LDq1048764@svn.freebsd.org> <4AEF22E3.5070701@freebsd.org> In-Reply-To: <4AEF22E3.5070701@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200911021955.02459.max@love2party.net> X-Provags-ID: V01U2FsdGVkX184ESEz+embCEgc89mkIOZ5KOXXKhdlZEfCY/q n8YHpw4nKTqs5fx72ZUdLzue83YJGVhNaBcDiq7COA8bSQ3GOC Ep5UiUd+xNblAx4+9UqaA== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson 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:55:05 -0000 On Monday 02 November 2009 19:20:19 Colin Percival wrote: > Robert Watson wrote: > > On Mon, 2 Nov 2009, Colin Percival wrote: > >> Attempt to reduce accidental foot-shooting by pointing out that > >> accept(2)ed sockets do not necessarily inherit O_NONBLOCK from > >> listening sockets on non-FreeBSD platforms. > > > > I wonder how much trouble we should go to to document bugs in other > > systems as non-portabilities for features that work in our system. > > I don't think there's any simple rule to apply here except "use common > sense". One can argue that FreeBSD man pages exist for the purpose of > documenting FreeBSD; but I'd also like to think that FreeBSD is a good > development platform for writing portable applications, so alerting our > users to potentially non-portable code certainly has some value. (And +1 ... FreeBSD is such a great development platform specifically because of the complete man page collection. I'd argue, however, that we should keep the portability notes to the fact that there might be a difference - without going into too much detail what/where and why that difference is. In addition, the more detail we add, the more likely it is that the information grows stale as others realize that they should follow our lead ;) > there are many other examples of "portable programs should not..." in > our man pages, not just the one I added.) > > The non-portability I just documented was a particularly obnoxious one, > since in event-driven code it can go unnoticed for a long time -- as I > just recently discovered. > > > 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. > -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News