Sign in to follow this  

XShm questions

This topic is 3500 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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