summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-12-22 06:30:09 +0100
committerStefan Kangas <stefankangas@gmail.com>2022-12-22 06:30:09 +0100
commit08bb91c7df4ebf0dd9de4d55575aaaed87a9b339 (patch)
tree245f7772c6466026384bed6c7f95af1b78235bb3 /src/fileio.c
parentad5a67996ddf23df904c09165475759e2e0a68b1 (diff)
parente59216d3be86918b995bd63273c851ebc6176a83 (diff)
downloademacs-08bb91c7df4ebf0dd9de4d55575aaaed87a9b339.tar.gz
Merge from origin/emacs-29
e59216d3be8 * Invoke spawed Emacs processes with '-Q' when native com... 777b383dd0f Fix Eshell electric slash when used from the root directo... c088cdad9e9 Fix the --without-all build with tree-sitter ec9fbad908d Fix write-region to null device on MS-Windows f35da111990 message: Do not default to eudc-capf-complete yet 98c16a8c883 ; * lisp/tab-bar.el: Remaining renaming of "fixed-width" ... d76d7a3bebf whitespace: Avoid mutating original buffer's markers in c...
Diffstat (limited to 'src/fileio.c')
-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,
{
/* Transfer data and metadata to disk, retrying if interrupted.
fsync can report a write failure here, e.g., due to disk full
- under NFS. But ignore EINVAL, which means fsync is not
- supported on this file. */
+ under NFS. But ignore EINVAL (and EBADF on Windows), which
+ means fsync is not supported on this file. */
while (fsync (desc) != 0)
if (errno != EINTR)
{
- if (errno != EINVAL)
+ if (errno != EINVAL
+#ifdef WINDOWSNT
+ && errno != EBADF
+#endif
+ )
ok = 0, save_errno = errno;
break;
}