Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: third_party/leveldatabase/env_chromium.cc

Issue 100253002: Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/linux/tests/unit_tests.cc ('k') | tools/android/common/adb_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved. 1 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. See the AUTHORS file for names of contributors. 3 // found in the LICENSE file. See the AUTHORS file for names of contributors.
4 4
5 #include <errno.h> 5 #include <errno.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 7
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 if (parent_fd < 0) { 530 if (parent_fd < 0) {
531 int saved_errno = errno; 531 int saved_errno = errno;
532 return MakeIOError( 532 return MakeIOError(
533 parent_dir_, strerror(saved_errno), kSyncParent, saved_errno); 533 parent_dir_, strerror(saved_errno), kSyncParent, saved_errno);
534 } 534 }
535 if (HANDLE_EINTR(fsync(parent_fd)) != 0) { 535 if (HANDLE_EINTR(fsync(parent_fd)) != 0) {
536 int saved_errno = errno; 536 int saved_errno = errno;
537 s = MakeIOError( 537 s = MakeIOError(
538 parent_dir_, strerror(saved_errno), kSyncParent, saved_errno); 538 parent_dir_, strerror(saved_errno), kSyncParent, saved_errno);
539 }; 539 };
540 HANDLE_EINTR(close(parent_fd)); 540 close(parent_fd);
541 #endif 541 #endif
542 return s; 542 return s;
543 } 543 }
544 544
545 Status ChromiumWritableFile::Append(const Slice& data) { 545 Status ChromiumWritableFile::Append(const Slice& data) {
546 if (file_type_ == kManifest && tracker_->DoesDirNeedSync(filename_)) { 546 if (file_type_ == kManifest && tracker_->DoesDirNeedSync(filename_)) {
547 Status s = SyncParent(); 547 Status s = SyncParent();
548 if (!s.ok()) 548 if (!s.ok())
549 return s; 549 return s;
550 tracker_->DidSyncDir(filename_); 550 tracker_->DidSyncDir(filename_);
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 Env* IDBEnv() { 1203 Env* IDBEnv() {
1204 return leveldb_env::idb_env.Pointer(); 1204 return leveldb_env::idb_env.Pointer();
1205 } 1205 }
1206 1206
1207 Env* Env::Default() { 1207 Env* Env::Default() {
1208 return leveldb_env::default_env.Pointer(); 1208 return leveldb_env::default_env.Pointer();
1209 } 1209 }
1210 1210
1211 } // namespace leveldb 1211 } // namespace leveldb
1212 1212
OLDNEW
« no previous file with comments | « sandbox/linux/tests/unit_tests.cc ('k') | tools/android/common/adb_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698