diff options
| author | Richard M. Stallman | 1993-06-01 21:15:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-06-01 21:15:25 +0000 |
| commit | 1daffa1cf9dd8b2e835eff77c9181a6e1028e08a (patch) | |
| tree | 204a23153b9d0efea57e3c95cf5c1050aebd5fbe /src | |
| parent | 0360eb4bb57359bd3aab0cf0029590c46046965d (diff) | |
| download | emacs-1daffa1cf9dd8b2e835eff77c9181a6e1028e08a.tar.gz emacs-1daffa1cf9dd8b2e835eff77c9181a6e1028e08a.zip | |
(Fwrite_region): Don't fsync if autosaving.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index 2c88a64976d..714c41410f7 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -2714,7 +2714,9 @@ to the file, instead of any buffer contents, and END is ignored.") | |||
| 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 | ||