diff options
author | Andreas Schwab <schwab@suse.de> | 2007-10-06 08:15:26 +0000 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2007-10-06 08:15:26 +0000 |
commit | 6cff77fd8a2d80eae2ae9bb8be115455cd0de418 (patch) | |
tree | 232d8a498e6f2a475ab2c1acdf4257feba561749 /src/fileio.c | |
parent | 590394eb5b47c7da5199260a26b0ce10fb536927 (diff) | |
download | emacs-6cff77fd8a2d80eae2ae9bb8be115455cd0de418.tar.gz emacs-6cff77fd8a2d80eae2ae9bb8be115455cd0de418.tar.bz2 emacs-6cff77fd8a2d80eae2ae9bb8be115455cd0de418.zip |
(Fwrite_region): Ignore EINVAL error from fsync.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index b76d243346e..29d12a0b0c3 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5359,8 +5359,10 @@ This does code conversion according to the value of it, and that means the fsync here is not crucial for autosave files. */ if (!auto_saving && !write_region_inhibit_fsync && fsync (desc) < 0) { - /* If fsync fails with EINTR, don't treat that as serious. */ - if (errno != EINTR) + /* If fsync fails with EINTR, don't treat that as serious. Also + ignore EINVAL which happens when fsync is not supported on this + file. */ + if (errno != EINTR && errno != EINVAL) failure = 1, save_errno = errno; } #endif |