> > On Thu, Mar 07, 2002 at 02:37:03AM +0100, Rainer Canavan wrote: > > The following patch gets it working (for me): > [snip]
[...] > Hmm. So the segment gets destroyed, even though it's attached. Bug in > the SGI xlib? Or is XFree86 just more forgiving? > > IPC_RMID is used to mark the segment as destroyed. It > will actually be destroyed after the last > detach. (I.e., when the shm_nattch member of > the associated structure shmid_ds is zero.) > The user must be the owner, creator, or the > super-user. That's the same I have read. > Anyhow. We're alrteady calling IPC_RMID when we close down cleanly, so > the one here is largely redundant. The question is what happens on an > unclean shutdown. Can you see if the shm segments are still attached if > you ctrl-c or otherwise kill freesci? they are still there: ozone:~/src/freesci-0.3.3/src$ ipcs IPC status from /dev/kmem as of Thu Mar 7 21:50:11 2002 Message Queues: T ID KEY MODE OWNER GROUP Shared Memory: m 25 0x00000000 --rw-rw-rw- canavan user m 26 0x00000000 --rw-rw-rw- canavan user m 27 0x00000000 --rw-rw-rw- canavan user is mode 666 really such a good idea? Well anyway, looks like a signal handler is needed to clean up afterwards, unless there's another way out. Rainer
