Mercurial > vim
diff src/evalfunc.c @ 15816:40336d427dd2 v8.1.0915
patch 8.1.0915: fsync() may not work properly on Mac
commit https://github.com/vim/vim/commit/a787019518a540a7b4d0070f15467931b870ac89
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Feb 14 12:56:36 2019 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 14 Feb 2019 13:00:22 +0100 |
parents | c24572e66556 |
children | 734b1928a5aa |
line wrap: on
line diff
--- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -14791,7 +14791,7 @@ f_writefile(typval_T *argvars, typval_T 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 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); }