summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-09-01 22:48:28 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-09-01 22:48:28 +0200
commit5b6821c0d0680785e8d5466c70e2debda3df3e3a (patch)
treeccd3dd0d8e3ecf0381da2931bece6beeb959bc02 /common
parentbc470c29771535f62764e1c9108c1c71128d4abd (diff)
Use fdatasync() to make sure modification are written
Diffstat (limited to 'common')
-rw-r--r--common/textfile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/textfile.c b/common/textfile.c
index eef0f96a..af895e58 100644
--- a/common/textfile.c
+++ b/common/textfile.c
@@ -271,6 +271,8 @@ unlock:
flock(fd, LOCK_UN);
close:
+ fdatasync(fd);
+
close(fd);
errno = err;