From 639b33d7b8443d62b762779c4a8bab1c84ad1af3 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 21 Jan 2014 08:50:04 +0100 Subject: [PATCH] fcntl.2: BUGS: The O_SYNC and O_DSYNC flags are not modifiable using F_SETFL Signed-off-by: Michael Kerrisk --- man2/fcntl.2 | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/man2/fcntl.2 b/man2/fcntl.2 index 2936f95b8..1b5b5d819 100644 --- a/man2/fcntl.2 +++ b/man2/fcntl.2 @@ -58,7 +58,7 @@ .\" 2010-06-17, Michael Kerrisk .\" Document F_SETPIPE_SZ and F_GETPIPE_SZ. .\" -.TH FCNTL 2 2012-04-15 "Linux" "Linux Programmer's Manual" +.TH FCNTL 2 2014-01-21 "Linux" "Linux Programmer's Manual" .SH NAME fcntl \- manipulate file descriptor .SH SYNOPSIS @@ -185,9 +185,11 @@ On Linux this command can change only the and .B O_NONBLOCK flags. -.\" FIXME . According to POSIX.1-2001, O_SYNC should also be modifiable -.\" via fcntl(2), but currently Linux does not permit this -.\" See http://bugzilla.kernel.org/show_bug.cgi?id=5994 +It is not possible to change the +.BR O_DSYNC +and +.BR O_SYNC +flags; see BUGS, below. .SS Advisory locking .BR F_GETLK ", " F_SETLK " and " F_SETLKW are used to acquire, release, and test for the existence of record @@ -1237,6 +1239,18 @@ Clearly, alone is not going to be very useful if the process holding the lock may live on a different machine. .SH BUGS +.SS F_SETFL +It is not possible to use +.BR F_SETFL +to change the state of the +.BR O_DYSNC +and +.BR O_SYNC +flags. +.\" FIXME . According to POSIX.1-2001, O_SYNC should also be modifiable +.\" via fcntl(2), but currently Linux does not permit this +.\" See http://bugzilla.kernel.org/show_bug.cgi?id=5994 +Attempts to change the state of these flags are silently ignored. .SS F_GETOWN A limitation of the Linux system call conventions on some architectures (notably i386) means that if a (negative)