diff options
Diffstat (limited to 'base/shared_memory_posix.cc')
-rw-r--r-- | base/shared_memory_posix.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/shared_memory_posix.cc b/base/shared_memory_posix.cc index 2f0fe22..fe4b225 100644 --- a/base/shared_memory_posix.cc +++ b/base/shared_memory_posix.cc @@ -70,6 +70,12 @@ SharedMemoryHandle SharedMemory::NULLHandle() { return SharedMemoryHandle(); } +// static +void SharedMemory::CloseHandle(const SharedMemoryHandle& handle) { + DCHECK(handle.fd >= 0); + close(handle.fd); +} + bool SharedMemory::Create(const std::wstring &name, bool read_only, bool open_existing, size_t size) { read_only_ = read_only; |