From owner-svn-src-all@FreeBSD.ORG Thu Jul 19 10:23:59 2012 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 A98281065674; Thu, 19 Jul 2012 10:23:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95A758FC1B; Thu, 19 Jul 2012 10:23:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q6JANxoG068269; Thu, 19 Jul 2012 10:23:59 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q6JANxiZ068267; Thu, 19 Jul 2012 10:23:59 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207191023.q6JANxiZ068267@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 19 Jul 2012 10:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238615 - 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: Thu, 19 Jul 2012 10:23:59 -0000 Author: kib Date: Thu Jul 19 10:23:59 2012 New Revision: 238615 URL: http://svn.freebsd.org/changeset/base/238615 Log: Document F_DUPFD_CLOEXEC. Also provide some wording changes for F_DUPFD to make it less confusing, at least for me. MFC after: 1 week Modified: head/lib/libc/sys/fcntl.2 Modified: head/lib/libc/sys/fcntl.2 ============================================================================== --- head/lib/libc/sys/fcntl.2 Thu Jul 19 10:22:54 2012 (r238614) +++ head/lib/libc/sys/fcntl.2 Thu Jul 19 10:23:59 2012 (r238615) @@ -28,7 +28,7 @@ .\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd July 18, 2012 .Dt FCNTL 2 .Os .Sh NAME @@ -54,7 +54,7 @@ Depending on the value of .Fn fcntl can take an additional third argument .Fa "int arg" . -.Bl -tag -width F_GETOWNX +.Bl -tag -width F_DUPFD_CLOEXEC .It Dv F_DUPFD Return a new descriptor as follows: .Pp @@ -73,11 +73,22 @@ Same access mode (read, write or read/wr Same file status flags (i.e., both file descriptors share the same file status flags). .It -The close-on-exec flag associated with the new file descriptor -is set to remain open across +The close-on-exec flag +.Dv FD_CLOEXEC +associated with the new file descriptor is cleared, so the file descriptor is +to remain open across .Xr execve 2 system calls. .El +.It Dv F_DUPFD_CLOEXEC +Like +.Dv F_DUPFD , +but the +.Dv FD_CLOEXEC +flag associated with the new file descriptor is set, so the file descriptor +is closed when +.Xr execve 2 +system call executes. .It Dv F_DUP2FD It is functionally equivalent to .Bd -literal -offset indent