Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2013 22:04:35 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r252622 - stable/9/lib/libc/sys
Message-ID:  <201307032204.r63M4ZNk034656@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Wed Jul  3 22:04:35 2013
New Revision: 252622
URL: http://svnweb.freebsd.org/changeset/base/252622

Log:
  MFC r248774: accept(2): Mention inheritance of O_ASYNC and signal
  destination.
  
  While almost nobody uses O_ASYNC, and rightly so, the inheritance of the
  related properties across accept() is a portability issue like the
  inheritance of O_NONBLOCK.

Modified:
  stable/9/lib/libc/sys/accept.2
Directory Properties:
  stable/9/lib/libc/   (props changed)
  stable/9/lib/libc/sys/   (props changed)

Modified: stable/9/lib/libc/sys/accept.2
==============================================================================
--- stable/9/lib/libc/sys/accept.2	Wed Jul  3 22:03:19 2013	(r252621)
+++ stable/9/lib/libc/sys/accept.2	Wed Jul  3 22:04:35 2013	(r252622)
@@ -28,7 +28,7 @@
 .\"     @(#)accept.2	8.2 (Berkeley) 12/11/93
 .\" $FreeBSD$
 .\"
-.Dd December 11, 1993
+.Dd March 26, 2013
 .Dt ACCEPT 2
 .Os
 .Sh NAME
@@ -57,7 +57,13 @@ queue of pending connections, creates a 
 and allocates a new file descriptor for the socket which
 inherits the state of the
 .Dv O_NONBLOCK
-property from the original socket
+and
+.Dv O_ASYNC
+properties and the destination of
+.Dv SIGIO
+and
+.Dv SIGURG
+signals from the original socket
 .Fa s .
 .Pp
 If no pending connections are
@@ -129,7 +135,11 @@ to pre-process incoming connections.
 .Pp
 Portable programs should not rely on the
 .Dv O_NONBLOCK
-property being inherited.
+and
+.Dv O_ASYNC
+properties and the signal destination being inherited,
+but should set them explicitly using
+.Xr fcntl 2 .
 .Sh RETURN VALUES
 The call returns \-1 on error.
 If it succeeds, it returns a non-negative



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307032204.r63M4ZNk034656>