!632 fix: 共享内存问题修复
Merge pull request !632 from Harylee/cherry-pick-1632710893
This commit is contained in:
commit
88a0caae24
|
@ -304,7 +304,7 @@ STATIC struct shmIDSource *ShmFindSeg(int shmid)
|
||||||
}
|
}
|
||||||
|
|
||||||
seg = &g_shmSegs[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);
|
set_errno(EIDRM);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue