mirror of
https://github.com/vim/vim.git
synced 2025-10-14 07:04:10 -04:00
patch 8.1.0915: fsync() may not work properly on Mac
Problem: fsync() may not work properly on Mac. Solution: Use fcntl() with F_FULLFSYNC. (suggested by Justin M. Keyes)
This commit is contained in:
@@ -14791,7 +14791,7 @@ f_writefile(typval_T *argvars, typval_T *rettv)
|
||||
else if (do_fsync)
|
||||
// Ignore the error, the user wouldn't know what to do about it.
|
||||
// May happen for a device.
|
||||
vim_ignored = fsync(fileno(fd));
|
||||
vim_ignored = vim_fsync(fileno(fd));
|
||||
#endif
|
||||
fclose(fd);
|
||||
}
|
||||
@@ -14803,7 +14803,7 @@ f_writefile(typval_T *argvars, typval_T *rettv)
|
||||
else if (do_fsync)
|
||||
/* Ignore the error, the user wouldn't know what to do about it.
|
||||
* May happen for a device. */
|
||||
vim_ignored = fsync(fileno(fd));
|
||||
vim_ignored = vim_fsync(fileno(fd));
|
||||
#endif
|
||||
fclose(fd);
|
||||
}
|
||||
|
Reference in New Issue
Block a user