1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00

(Fwrite_region): Ignore EINVAL error from fsync.

This commit is contained in:
Andreas Schwab 2007-10-06 08:15:26 +00:00
parent 590394eb5b
commit 6cff77fd8a
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2007-10-06 Andreas Schwab <schwab@suse.de>
* fileio.c (Fwrite_region): Ignore EINVAL error from fsync.
2007-10-04 Juanma Barranquero <lekktu@gmail.com>
* image.c (syms_of_image) <image-types>: Fix typo in docstring.

View file

@ -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