summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-07-19 10:23:59 +0000
committerkib <kib@FreeBSD.org>2012-07-19 10:23:59 +0000
commitd950d8a13fa882cc5c23240d4fa991db5fee3ef6 (patch)
treeba83d87662e0d4a268478d5e9b7e2f8f80623c7d /lib/libc
parentfb0ee769bd9aa180616ea0ffdb18d9c7bd7a7dfa (diff)
downloadFreeBSD-src-d950d8a13fa882cc5c23240d4fa991db5fee3ef6.zip
FreeBSD-src-d950d8a13fa882cc5c23240d4fa991db5fee3ef6.tar.gz
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
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/fcntl.219
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2
index beceb72..0844e87 100644
--- a/lib/libc/sys/fcntl.2
+++ b/lib/libc/sys/fcntl.2
@@ -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/write).
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
OpenPOWER on IntegriCloud