From owner-svn-src-head@FreeBSD.ORG Tue Oct 1 21:17:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 992C4B33; Tue, 1 Oct 2013 21:17:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 865102B0A; Tue, 1 Oct 2013 21:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r91LHIuw029613; Tue, 1 Oct 2013 21:17:18 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r91LHIKh029612; Tue, 1 Oct 2013 21:17:18 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201310012117.r91LHIKh029612@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 1 Oct 2013 21:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r255980 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Oct 2013 21:17:18 -0000 Author: jilles Date: Tue Oct 1 21:17:18 2013 New Revision: 255980 URL: http://svnweb.freebsd.org/changeset/base/255980 Log: accept(2): Update portability note for accept4(). The accept(2) man page warns that O_NONBLOCK and other properties on the new socket may vary across implementations. However, this issue only applies to accept() and not to accept4(). On the other hand, accept4() is not commonly available yet. Reported by: pluknet Reviewed by: bjk Approved by: re (kib) Modified: head/lib/libc/sys/accept.2 Modified: head/lib/libc/sys/accept.2 ============================================================================== --- head/lib/libc/sys/accept.2 Tue Oct 1 20:18:33 2013 (r255979) +++ head/lib/libc/sys/accept.2 Tue Oct 1 21:17:18 2013 (r255980) @@ -28,7 +28,7 @@ .\" @(#)accept.2 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd May 1, 2013 +.Dd October 1, 2013 .Dt ACCEPT 2 .Os .Sh NAME @@ -155,13 +155,20 @@ For some applications, performance may b .Xr accept_filter 9 to pre-process incoming connections. .Pp -Portable programs should not rely on the +When using +.Fn accept , +portable programs should not rely on the .Dv O_NONBLOCK and .Dv O_ASYNC properties and the signal destination being inherited, but should set them explicitly using -.Xr fcntl 2 . +.Xr fcntl 2 ; +.Fn accept4 +sets these properties consistently, +but may not be fully portable across +.Ux +platforms. .Sh RETURN VALUES These calls return \-1 on error. If they succeed, they return a non-negative