clearing shared memory from unterminated processes


Click here for full thread
Forum Regular
Hi Tee,
Using ipcrm will only clear a shared memory segment up when there are no processes attached to it (nattch 0 as you found). In your example there are still 12 processes attached to the shared memory region. Therefore the shared memory region will be deleted only when those 12 processes detach from it. One way to force the processes to detach is to kill them (if you know which processes those are), otherwise the processes will automatically detach when the calculation completes and the processes terminate. Whichever way as soon as the processes detach the shared memory segment will automatically disappear if you previously scheduled it for deletion using ipcrm.
I hope this helps, Huub