summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-09-22 23:50:58 +0100
committersin <sin@2f30.org>2014-09-22 23:50:58 +0100
commitea2da3a713a6f1d6383c13394584fea74f906e5a (patch)
treef3f1a169aa64cb2ab3c76ecd2fad4ce58a6830f5
parente4336f7c196af94705c3e001b8835300f6e3a3e1 (diff)
Use fsync() on fd in datasave()
-rw-r--r--ratox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ratox.c b/ratox.c
index d52e0a2..b827f74 100644
--- a/ratox.c
+++ b/ratox.c
@@ -653,6 +653,7 @@ datasave(void)
perror("write");
exit(EXIT_FAILURE);
}
+ fsync(fd);
free(data);
close(fd);