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

Unified Diff: chrome/common/file_descriptor_set_posix.cc

Issue 100225: POSIX: Add a macro for handling EINTR. (Closed)
Patch Set: ... Created 11 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/renderer_host/render_widget_helper.cc ('k') | chrome/common/file_descriptor_set_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/file_descriptor_set_posix.cc
diff --git a/chrome/common/file_descriptor_set_posix.cc b/chrome/common/file_descriptor_set_posix.cc
index b57c0076e7220e741a2a2dd28539b531643df522..c18d169a1c901825ce3d869d3dc9b5c7124bc37c 100644
--- a/chrome/common/file_descriptor_set_posix.cc
+++ b/chrome/common/file_descriptor_set_posix.cc
@@ -4,6 +4,7 @@
#include "chrome/common/file_descriptor_set_posix.h"
+#include "base/eintr_wrappers.h"
#include "base/logging.h"
FileDescriptorSet::FileDescriptorSet()
@@ -26,7 +27,7 @@ FileDescriptorSet::~FileDescriptorSet() {
for (unsigned i = consumed_descriptor_highwater_;
i < descriptors_.size(); ++i) {
if (descriptors_[i].auto_close)
- close(descriptors_[i].fd);
+ HANDLE_EINTR(close(descriptors_[i].fd));
}
}
@@ -97,7 +98,7 @@ void FileDescriptorSet::CommitAll() {
for (std::vector<base::FileDescriptor>::iterator
i = descriptors_.begin(); i != descriptors_.end(); ++i) {
if (i->auto_close)
- close(i->fd);
+ HANDLE_EINTR(close(i->fd));
}
descriptors_.clear();
consumed_descriptor_highwater_ = 0;
« no previous file with comments | « chrome/browser/renderer_host/render_widget_helper.cc ('k') | chrome/common/file_descriptor_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698