提交 88a0caae 编写于 作者: O openharmony_ci 提交者: Gitee

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

Merge pull request !632 from Harylee/cherry-pick-1632710893
......@@ -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.
先完成此消息的编辑!
想要评论请 注册