Wrap calls to fsync with skip_eintr.
GitOrigin-RevId: c7eaba54794d461428cce064e51be26909f39a30
This commit is contained in:
parent
b8e8f337c2
commit
948da791ad
@ -468,9 +468,9 @@ Status FileFd::sync() {
|
||||
CHECK(!empty());
|
||||
#if TD_PORT_POSIX
|
||||
#if TD_DARWIN
|
||||
if (fcntl(get_native_fd().fd(), F_FULLFSYNC) == -1) {
|
||||
if (detail::skip_eintr([&] { return fcntl(get_native_fd().fd(), F_FULLFSYNC); }) == -1) {
|
||||
#else
|
||||
if (fsync(get_native_fd().fd()) != 0) {
|
||||
if (detail::skip_eintr([&] { return fsync(get_native_fd().fd()); }) != 0) {
|
||||
#endif
|
||||
#elif TD_PORT_WINDOWS
|
||||
if (FlushFileBuffers(get_native_fd().fd()) == 0) {
|
||||
|
Reference in New Issue
Block a user