XShm change




I've made a small change in handling shared memory images
in GDK ... instead of the sequence:

 XShmCreateImage ()
 shmget ()
 shmat ()
 shmctl (x_shm_info->shmid, IPC_RMID, 0);
 XShmAttach (),

I've changed it to do:

 XShmCreateImage ()
 shmget ()
 shmat ()
 XShmAttach (),
 shmctl (x_shm_info->shmid, IPC_RMID, 0);

Jamie Zawinski pointed out to me that xscreensaver does it
the latter way, and it apparently works everywhere. 

(The difference is that X doesn't need to attach to a segment
 that has already been destroyed)

So, I've made the shmctl() unconditional, and ignored
the results of the current configure test.

If people test this out, and it does in fact work everywhere, 
then I'll remove the configure test and also remove the
signal handlers that GTK+ installs to clean up after 
left-over shared memory segments.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]