aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2013-03-21 21:39:15 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2013-03-21 21:39:15 +0000
commit46f10cc265c51d774ebeeb6c4f73b377fd5e3a1e (patch)
treee756abc366141c7640e7f11af6544149e89bf4bb /lib/libc/sys
parentd52d7aa8714929fc0f26e605aafa38461213e606 (diff)
downloadsrc-46f10cc265c51d774ebeeb6c4f73b377fd5e3a1e.tar.gz
src-46f10cc265c51d774ebeeb6c4f73b377fd5e3a1e.zip
Allow O_CLOEXEC in posix_openpt() flags.
PR: kern/162374 Reviewed by: ed
Notes
Notes: svn path=/head/; revision=248593
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/posix_openpt.29
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/sys/posix_openpt.2 b/lib/libc/sys/posix_openpt.2
index 2633847a6961..9ba26068ac72 100644
--- a/lib/libc/sys/posix_openpt.2
+++ b/lib/libc/sys/posix_openpt.2
@@ -37,7 +37,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 20, 2008
+.Dd March 21, 2013
.Dt POSIX_OPENPT 2
.Os
.Sh NAME
@@ -71,7 +71,7 @@ Values for
are constructed by a bitwise-inclusive OR of flags from the following
list, defined in
.In fcntl.h :
-.Bl -tag -width ".Dv O_NOCTTY"
+.Bl -tag -width ".Dv O_CLOEXEC"
.It Dv O_RDWR
Open for reading and writing.
.It Dv O_NOCTTY
@@ -79,6 +79,8 @@ If set
.Fn posix_openpt
shall not cause the terminal device to become the controlling terminal
for the process.
+.It Dv O_CLOEXEC
+Set the close-on-exec flag for the new file descriptor.
.El
.Pp
The
@@ -116,6 +118,9 @@ The
.Fn posix_openpt
function conforms to
.St -p1003.1-2001 .
+The ability to use
+.Dv O_CLOEXEC
+is an extension to the standard.
.Sh HISTORY
The
.Fn posix_openpt