aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys/open.2
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2005-12-01 17:54:33 +0000
committerWarner Losh <imp@FreeBSD.org>2005-12-01 17:54:33 +0000
commitedd94d735cdd47d52d5f7d5d2893745e7b25d88f (patch)
treeef28a7732696f6a90a74494d2f1ddf032abf95f7 /lib/libc/sys/open.2
parentef8d441925aa28fd92698ac95d002787e99ba7bb (diff)
Notes
Diffstat (limited to 'lib/libc/sys/open.2')
-rw-r--r--lib/libc/sys/open.217
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2
index 14d8722a109de..a2de15029a05b 100644
--- a/lib/libc/sys/open.2
+++ b/lib/libc/sys/open.2
@@ -86,7 +86,9 @@ O_SHLOCK atomically obtain a shared lock
O_EXLOCK atomically obtain an exclusive lock
O_DIRECT eliminate or reduce cache effects
O_FSYNC synchronous writes
+O_SYNC synchronous writes
O_NOFOLLOW do not follow symlinks
+O_NOCTTY don't assign controlling terminal
.Ed
.Pp
Opening a file with
@@ -133,6 +135,11 @@ the kernel will not cache written data
and all writes on the descriptor will not return until
the data to be written completes.
.Pp
+.Dv O_SYNC
+is a synonym for
+.Dv O_FSYNC
+required by POSIX.
+.Pp
If
.Dv O_NOFOLLOW
is used in the mask and the target file passed to
@@ -160,6 +167,16 @@ If it cannot avoid caching the data,
it will minimize the impact the data has on the cache.
Use of this flag can drastically reduce performance if not used with care.
.Pp
+.Dv O_NOCTTY
+may be used to ensure the OS does not assign this file as the
+controlling terminal when it opens a tty device.
+This is the default on
+.Fx ,
+but is present for POSIX 1003.1 compatibility.
+.Fn open
+will not assign controlling terminals on
+.Fx .
+.Pp
If successful,
.Fn open
returns a non-negative integer, termed a file descriptor.