aboutsummaryrefslogtreecommitdiffstats
path: root/db_file.c
diff options
context:
space:
mode:
authorwrog <wrog>2007-11-12 11:17:03 +0000
committerwrog <wrog>2007-11-12 11:17:03 +0000
commitc9861041889dd821860edf41d0ea1483e7f1f27e (patch)
treedcc75674a0c3852874821dd462588fdb8a86e645 /db_file.c
parent480dd1eb952008ee52fc616e15d436e0a06a8ebd (diff)
downloadmoo-cvs-master.tar.gz
moo-cvs-master.tar.xz
moo-cvs-master.zip
sync so that checkpoint is physically written before prior checkpoint is unlinkedHEADWAIF.ROOT.4sourceforgemaster
Diffstat (limited to 'db_file.c')
-rw-r--r--db_file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/db_file.c b/db_file.c
index 0918286..b9c7827 100644
--- a/db_file.c
+++ b/db_file.c
@@ -20,6 +20,7 @@
*****************************************************************************/
#include "my-stat.h"
+#include "my-unistd.h"
#include "my-stdio.h"
#include "my-stdlib.h"
@@ -608,6 +609,8 @@ dump_database(Dump_Reason reason)
goto retryDumping;
}
} else {
+ fflush(f);
+ fsync(fileno(f));
fclose(f);
oklog("%s on %s finished\n", reason_names[reason], temp_name);
if (reason != DUMP_PANIC) {
@@ -735,6 +738,9 @@ char rcsid_db_file[] = "$Id$";
/*
* $Log$
+ * Revision 1.6 2007/11/12 11:17:03 wrog
+ * sync so that checkpoint is physically written before prior checkpoint is unlinked
+ *
* Revision 1.5 2004/05/22 01:25:43 wrog
* merging in WROGUE changes (W_SRCIP, W_STARTUP, W_OOB)
*