changeset 3415:c37d05ce7e52

(Fwrite_region): Don't fsync if autosaving.
author Richard M. Stallman <rms@gnu.org>
date Tue, 01 Jun 1993 21:15:25 +0000
parents 58a40b252797
children 5bd76dd4c6bd
files src/fileio.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Tue Jun 01 21:07:09 1993 +0000
+++ b/src/fileio.c	Tue Jun 01 21:15:25 1993 +0000
@@ -2714,7 +2714,9 @@
 #ifdef HAVE_FSYNC
   /* Note fsync appears to change the modtime on BSD4.2 (both vax and sun).
      Disk full in NFS may be reported here.  */
-  if (fsync (desc) < 0)
+  /* mib says that closing the file will try to write as fast as NFS can do
+     it, and that means the fsync here is not crucial for autosave files.  */
+  if (!auto_saving && fsync (desc) < 0)
     failure = 1, save_errno = errno;
 #endif