summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2019-04-18 23:51:14 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2019-04-18 23:51:14 +0000
commit2286eb1ff08c9837398bb11ca50fa51ce15a0745 (patch)
treeb420030e71c5f5b8a8788947d07dd0410c8772c9 /lib/libc/sys
parente32e739ff021bb851a05ab6d8e07c216ecef66a4 (diff)
describe EIO failure state. noted by Maximilian Lorlacks
Diffstat (limited to 'lib/libc/sys')
-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