diff options
| author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2023-08-04 17:03:28 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2023-08-12 00:57:32 +0200 |
| commit | 2999582aa0d2ee72480f687c826f237da61264ef (patch) | |
| tree | 800cb6a5c764b4ebfa23ef1ed616f6666441e281 | |
| parent | 7d94c365cb40069db110db1153927cbc0922f400 (diff) | |
| download | man-pages-2999582aa0d2ee72480f687c826f237da61264ef.tar.gz | |
fsync.2: There are no writability requirements
Since Issue 3 (original release), fsync() was required to operate on
all valid fds. Since Issue 7 2018, fdatasync() is as well (and required
writability only by editorial mistake):
https://www.austingroupbugs.net/view.php?id=501
"Some UNIXes require the fd to be writable" is a
needlessly-adversarial-to-the-user ‒
https://101010.pl/@eater@cijber.social/110824211348995583
‒ way of saying "HP-UX and AIX have always been broken": just say that.
Originally appeared in 4.2BSD (4.1c.2BSD) so touch that as well since
we're mentioning the original interface.
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: Guillem Jover <guillem@hadrons.org>
Cc: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rw-r--r-- | man2/fsync.2 | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/man2/fsync.2 b/man2/fsync.2 index 1043e6a1ba..036af0a9ef 100644 --- a/man2/fsync.2 +++ b/man2/fsync.2 @@ -155,16 +155,10 @@ to a value greater than 0. .\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L. .\" -1: unavailable, 0: ask using sysconf(). .\" glibc defines them to 1. -.PP -On some UNIX systems (but not Linux), -.I fd -must be a -.I writable -file descriptor. .SH STANDARDS POSIX.1-2008. .SH HISTORY -POSIX.1-2001, 4.3BSD. +POSIX.1-2001, 4.2BSD. .PP In Linux 2.2 and earlier, .BR fdatasync () @@ -181,6 +175,13 @@ In these cases disk caches need to be disabled using or .BR sdparm (8) to guarantee safe operation. +.PP +Under AT&T UNIX System V Release 4 +.I fd +needs to be opened for writing. +This is by itself incompatible with the original BSD interface +and forbidden by POSIX, +but nevertheless survives in HP-UX and AIX. .SH SEE ALSO .BR sync (1), .BR bdflush (2), |
