summaryrefslogtreecommitdiffstats
path: root/base/memory/shared_memory_posix.cc
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-10-02 16:49:26 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-02 23:50:21 +0000
commit0d77970a8b112c2f047f85f5ae7c7a1091d4efe5 (patch)
tree6326c2aecba199312ecdbc3965969d62830e19bd /base/memory/shared_memory_posix.cc
parentd53c29e62744959fd377ca85bd9a34c0c1102bbe (diff)
downloadchromium_src-0d77970a8b112c2f047f85f5ae7c7a1091d4efe5.zip
chromium_src-0d77970a8b112c2f047f85f5ae7c7a1091d4efe5.tar.gz
chromium_src-0d77970a8b112c2f047f85f5ae7c7a1091d4efe5.tar.bz2
mac: Implement Mach-primitive backed shared memory.
No code outside of tests instantiates Mach-primitive backed shared memory, so this should have no functional effect on official builds of Chrome. BUG=466437 Review URL: https://codereview.chromium.org/1362193003 Cr-Commit-Position: refs/heads/master@{#352177}
Diffstat (limited to 'base/memory/shared_memory_posix.cc')
-rw-r--r--base/memory/shared_memory_posix.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/memory/shared_memory_posix.cc b/base/memory/shared_memory_posix.cc
index 6a7c1d5..96344c6 100644
--- a/base/memory/shared_memory_posix.cc
+++ b/base/memory/shared_memory_posix.cc
@@ -147,7 +147,7 @@ SharedMemoryHandle SharedMemory::NULLHandle() {
// static
void SharedMemory::CloseHandle(const SharedMemoryHandle& handle) {
DCHECK_GE(handle.fd, 0);
- if (close(handle.fd) < 0)
+ if (IGNORE_EINTR(close(handle.fd)) < 0)
DPLOG(ERROR) << "close";
}
@@ -392,12 +392,12 @@ SharedMemoryHandle SharedMemory::handle() const {
void SharedMemory::Close() {
if (mapped_file_ > 0) {
- if (close(mapped_file_) < 0)
+ if (IGNORE_EINTR(close(mapped_file_)) < 0)
PLOG(ERROR) << "close";
mapped_file_ = -1;
}
if (readonly_mapped_file_ > 0) {
- if (close(readonly_mapped_file_) < 0)
+ if (IGNORE_EINTR(close(readonly_mapped_file_)) < 0)
PLOG(ERROR) << "close";
readonly_mapped_file_ = -1;
}