sync: Windows implementation of sync() call.

Replace calls to sync() with calls to sync_disks() which supports
Win32 via FlushFileBuffers.
This commit is contained in:
Richard Jones
2009-11-25 10:26:48 +00:00
parent c2aad5cd92
commit fdbc5aa711
4 changed files with 110 additions and 7 deletions

View File

@@ -34,7 +34,10 @@ do_drop_caches (int what)
{
FILE *fp;
sync ();
if (sync_disks () == -1) {
reply_with_perror ("sync");
return -1;
}
fp = fopen (PROCFILE, "w");
if (fp == NULL) {