diff --git a/common/params.cc b/common/params.cc index 03a3cc31f1..615dd55abd 100644 --- a/common/params.cc +++ b/common/params.cc @@ -24,8 +24,8 @@ int fsync_dir(const std::string &path) { int result = -1; int fd = HANDLE_EINTR(open(path.c_str(), O_RDONLY, 0755)); if (fd >= 0) { - result = fsync(fd); - close(fd); + result = HANDLE_EINTR(fsync(fd)); + HANDLE_EINTR(close(fd)); } return result; }