shared memory not getting freed
I have a program that allocates shared memory for itself and then forks and attaches the same shared memory to the child process. it looks like the shared memory is not getting freed after both the parent and child detach and call shmctl(shm_id, IPC_RMID, NULL), but when I use the command ipcs -m in a shell, all of the IDs I allocated still show up, but show that they are unattached. I'm not sure what more I need to do to free these shared memory segments. any help would be greatly appreciated.
thanks in advance.