summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 05:07:27 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 05:07:27 +0000
commitf7fc18bdc754687e9063edaf6728167e63ca3e95 (patch)
treefc7f94208dd26ad6bcae45c9bfe688af76c5d25e /third_party
parenta5c5857416ac22d03c5653f3758254e611dbdef5 (diff)
downloadchromium_src-f7fc18bdc754687e9063edaf6728167e63ca3e95.zip
chromium_src-f7fc18bdc754687e9063edaf6728167e63ca3e95.tar.gz
chromium_src-f7fc18bdc754687e9063edaf6728167e63ca3e95.tar.bz2
Surround LevelDB fflush calls with HANDLE_EINTR.
From the man page: The function fflush() may also fail and set errno for any of the errors specified for write(2). write can fail with EINTR. BUG=222266 Review URL: https://chromiumcodereview.appspot.com/13261002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191303 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/leveldatabase/env_chromium.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index cac8c60..2b7c62a 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -289,7 +289,7 @@ class ChromiumWritableFile : public WritableFile {
virtual Status Flush() {
Status result;
- if (fflush_unlocked(file_) != 0) {
+ if (HANDLE_EINTR(fflush_unlocked(file_))) {
result = Status::IOError(filename_, strerror(errno));
uma_logger_->RecordErrorAt(kWritableFileFlush);
}
@@ -299,8 +299,8 @@ class ChromiumWritableFile : public WritableFile {
virtual Status Sync() {
Status result;
int error = 0;
-
- if (fflush_unlocked(file_))
+
+ if (HANDLE_EINTR(fflush_unlocked(file_)))
error = errno;
// Sync even if fflush gave an error; perhaps the data actually got out,
// even though something went wrong.