comparison src/fileio.c @ 10:4e2284e71352

updated for version 7.0002
author vimboss
date Thu, 24 Jun 2004 15:53:16 +0000
parents 4102fb4ea781
children 4424b47a0797
comparison
equal deleted inserted replaced
9:4102fb4ea781 10:4e2284e71352
3963 #if defined(UNIX) && defined(HAVE_FSYNC) 3963 #if defined(UNIX) && defined(HAVE_FSYNC)
3964 /* On many journalling file systems there is a bug that causes both the 3964 /* On many journalling file systems there is a bug that causes both the
3965 * original and the backup file to be lost when halting the system right 3965 * original and the backup file to be lost when halting the system right
3966 * after writing the file. That's because only the meta-data is 3966 * after writing the file. That's because only the meta-data is
3967 * journalled. Syncing the file slows down the system, but assures it has 3967 * journalled. Syncing the file slows down the system, but assures it has
3968 * been written to disk and we don't lose it. */ 3968 * been written to disk and we don't lose it.
3969 if (fsync(fd) != 0) 3969 * For a device do try the fsync() but don't complain if it does not work
3970 * (could be a pipe). */
3971 if (fsync(fd) != 0 && !device)
3970 { 3972 {
3971 errmsg = (char_u *)_("E667: Fsync failed"); 3973 errmsg = (char_u *)_("E667: Fsync failed");
3972 end = 0; 3974 end = 0;
3973 } 3975 }
3974 #endif 3976 #endif