未验证 提交 f8557cd9 编写于 作者: Z zhangbo9674 提交者: GitHub

refine code (#50053)

上级 3da73f8f
...@@ -198,8 +198,7 @@ void RefcountedMemoryMapAllocation::close() { ...@@ -198,8 +198,7 @@ void RefcountedMemoryMapAllocation::close() {
MemoryMapAllocationPool::Instance().Insert(MemoryMapInfo( MemoryMapAllocationPool::Instance().Insert(MemoryMapInfo(
flags_, map_size_ - mmap_alignment, ipc_name_, map_ptr_)); flags_, map_size_ - mmap_alignment, ipc_name_, map_ptr_));
} else { } else {
if (info->refcount == 0 && if (info->refcount == 0) {
shm_open(ipc_name_.c_str(), O_RDWR, (mode_t)0600) != -1) {
shm_unlink(ipc_name_.c_str()); shm_unlink(ipc_name_.c_str());
VLOG(6) << "shm_unlink file: " << ipc_name_; VLOG(6) << "shm_unlink file: " << ipc_name_;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册