scarybeasts / beebjit

A very fast BBC Micro emulator.
Other
132 stars 15 forks source link

Don't free shared memory until after XShmAttach. #4

Closed tom-seddon closed 4 years ago

tom-seddon commented 4 years ago

The XSync is apparently necessary to ensure the XShmAttach call is complete before doing the shmctl(...,IPC_RMID). This complicates the shared memory removal, as it has to be done in the X error callback too, which has no context parameter.

(I had the XSync fail when trying to run beebjit with a remote X server.)

tom-seddon commented 4 years ago

There doesn't seem to be a neat way of doing this so I just did something that seems to work.

scarybeasts commented 4 years ago

Thanks! I'm feeling lucky so I'll merge, pull, and see if it's happy on my setup :)