🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

XShm questions

Started by
1 comment, last by bradbobak 16 years, 1 month ago
Hi, I have a couple XShm* questions. #1 : what is the event mask I should be watching for when XShmPutImage() posts a completion message? #2 : is there any way to detach all left-over shared memory segments from the x-server? Like say my app exits unexpectedly, I'd like to clear out X's attached shared memory segments. (I will be trapping signals to do this, but during the debug stage I keep running out of shared memory, so i'd like to be able to release every segment the X server is holding) Thanks in advance, Bradd.
Advertisement
ok, for #2 I found a workaround.. After the server attaches to the segment, I can use shmctl() to remove the segment in the client (after an XSync()).. since the server is still attached to it, it will remain until the program exits and the server releases it.
I also specified #2 wrong.. it was my client not removing the shm segment. I guess the XServer takes care of its end..
For #1, I have found a work-around.. It involves using XIfEvent() and friends to check for the event.

This topic is closed to new replies.

Advertisement