summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2019-04-18 23:51:13 +0000
committertedu <tedu@openbsd.org>2019-04-18 23:51:13 +0000
commitde6b920c2e9772b51ee37228becb354027d724f7 (patch)
tree6c36621b8ba37606451f8ad11c568ca950a5657b /lib
parentunfold some compound operations to make this easier to follow (diff)
downloadwireguard-openbsd-de6b920c2e9772b51ee37228becb354027d724f7.tar.xz
wireguard-openbsd-de6b920c2e9772b51ee37228becb354027d724f7.zip
describe EIO failure state. noted by Maximilian Lorlacks
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/fsync.214
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/libc/sys/fsync.2 b/lib/libc/sys/fsync.2
index c9831ca095d..348c2625870 100644
--- a/lib/libc/sys/fsync.2
+++ b/lib/libc/sys/fsync.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fsync.2,v 1.14 2015/09/10 17:55:21 schwarze Exp $
+.\" $OpenBSD: fsync.2,v 1.15 2019/04/18 23:51:13 tedu Exp $
.\" $NetBSD: fsync.2,v 1.4 1995/02/27 12:32:38 cgd Exp $
.\"
.\" Copyright (c) 1983, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)fsync.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: September 10 2015 $
+.Dd $Mdocdate: April 18 2019 $
.Dt FSYNC 2
.Os
.Sh NAME
@@ -66,6 +66,16 @@ and
.Fn fdatasync
should be used by programs that require a file to be in a known state,
for example, in building a simple transaction facility.
+.Pp
+If
+.Fn fsync
+or
+.Fn fdatasync
+fail with
+.Er EIO ,
+the state of the on-disk data may have been only partially written.
+To guard against potential inconsistency, future calls will continue failing
+until all references to the file are closed.
.Sh RETURN VALUES
.Rv -std fsync fdatasync
.Sh ERRORS