From 04e161e4991f9030150820adb770c63ee48e0214 Mon Sep 17 00:00:00 2001 From: alfred Date: Wed, 29 Nov 2000 04:08:49 +0000 Subject: document O_NOFOLLOW and O_FSYNC flags to open --- lib/libc/sys/open.2 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lib/libc/sys/open.2') diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index 439b4b48e..769ac27 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -83,6 +83,8 @@ O_TRUNC truncate size to 0 O_EXCL error if create and file exists O_SHLOCK atomically obtain a shared lock O_EXLOCK atomically obtain an exclusive lock +O_FSYNC synchronous writes +O_NOFOLLOW do not follow symlinks .Ed .Pp Opening a file with @@ -120,6 +122,22 @@ returns immediately. The first time the process attempts to perform I/O on the open file it will block (not currently implemented). .Pp +If +.Dv O_FSYNC +is used in the mask, all writes will +immediately be written to disk, +the kernel will not cache written data +and all writes on the descriptor will not return until +the data to be written completes. +.Pp +If +.Dv O_NOFOLLOW +is used in the mask and the target file passed to +.Fn open +is a symbolic link then the +.Fn open +will fail. +.Pp When opening a file, a lock with .Xr flock 2 semantics can be obtained by setting @@ -216,6 +234,9 @@ and the file is to be modified. The process has already reached its limit for open file descriptors. .It Bq Er ENFILE The system file table is full. +.It Bq Er EMLINK +.Dv O_NOFOLLOW +was specified and the target is a symbolic link. .It Bq Er ENXIO The named file is a character special or block special file, and the device associated with this special file -- cgit v1.1