提交 1150f86d 编写于 作者: O openharmony_ci 提交者: Gitee

!628 fix: 共享内存问题修复

Merge pull request !628 from Harylee/shm
......@@ -304,7 +304,7 @@ STATIC struct shmIDSource *ShmFindSeg(int shmid)
}
seg = &g_shmSegs[shmid];
if ((seg->status & SHM_SEG_FREE) || (seg->status & SHM_SEG_REMOVE)) {
if ((seg->status & SHM_SEG_FREE) || ((seg->ds.shm_nattch == 0) && (seg->status & SHM_SEG_REMOVE))) {
set_errno(EIDRM);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册