params: wrap fsync and close in HANDLE_EINTR for robustness (#33154)

Wrap fsync and close in HANDLE_EINTR for Robustness
pull/33125/head
Dean Lee 9 months ago committed by GitHub
parent 2189164d45
commit ea5ee29ebd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      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;
}

Loading…
Cancel
Save