SHMSEG_FREE
shmseg->shm_perm.mode = SHMSEG_FREE;
if (shmsegs[segnum].shm_perm.mode & SHMSEG_FREE)
if ((shmsegs[i].shm_perm.mode & SHMSEG_FREE) == 0)
newshmsegs[i].shm_perm.mode = SHMSEG_FREE;
shmsegs[i].shm_perm.mode = SHMSEG_FREE;