Mercurial > emacs
comparison src/fileio.c @ 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 | 47b51faf6c4e |
children | 95021dcb923b |
comparison
equal
deleted
inserted
replaced
3414:58a40b252797 | 3415:c37d05ce7e52 |
---|---|
2712 immediate_quit = 0; | 2712 immediate_quit = 0; |
2713 | 2713 |
2714 #ifdef HAVE_FSYNC | 2714 #ifdef HAVE_FSYNC |
2715 /* Note fsync appears to change the modtime on BSD4.2 (both vax and sun). | 2715 /* Note fsync appears to change the modtime on BSD4.2 (both vax and sun). |
2716 Disk full in NFS may be reported here. */ | 2716 Disk full in NFS may be reported here. */ |
2717 if (fsync (desc) < 0) | 2717 /* mib says that closing the file will try to write as fast as NFS can do |
2718 it, and that means the fsync here is not crucial for autosave files. */ | |
2719 if (!auto_saving && fsync (desc) < 0) | |
2718 failure = 1, save_errno = errno; | 2720 failure = 1, save_errno = errno; |
2719 #endif | 2721 #endif |
2720 | 2722 |
2721 /* Spurious "file has changed on disk" warnings have been | 2723 /* Spurious "file has changed on disk" warnings have been |
2722 observed on Suns as well. | 2724 observed on Suns as well. |