aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c
index e7c2af81421..66ce6b30887 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5376,12 +5376,16 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
5376 { 5376 {
5377 /* Transfer data and metadata to disk, retrying if interrupted. 5377 /* Transfer data and metadata to disk, retrying if interrupted.
5378 fsync can report a write failure here, e.g., due to disk full 5378 fsync can report a write failure here, e.g., due to disk full
5379 under NFS. But ignore EINVAL, which means fsync is not 5379 under NFS. But ignore EINVAL (and EBADF on Windows), which
5380 supported on this file. */ 5380 means fsync is not supported on this file. */
5381 while (fsync (desc) != 0) 5381 while (fsync (desc) != 0)
5382 if (errno != EINTR) 5382 if (errno != EINTR)
5383 { 5383 {
5384 if (errno != EINVAL) 5384 if (errno != EINVAL
5385#ifdef WINDOWSNT
5386 && errno != EBADF
5387#endif
5388 )
5385 ok = 0, save_errno = errno; 5389 ok = 0, save_errno = errno;
5386 break; 5390 break;
5387 } 5391 }