Sign in to follow this  
bradbobak

XShm questions

Recommended Posts

bradbobak    1825
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.

Share this post


Link to post
Share on other sites
bradbobak    1825
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..

Share this post


Link to post
Share on other sites
Sign in to follow this