ddvk / remarkable2-framebuffer

remarkable2 framebuffer reversing
MIT License
279 stars 22 forks source link

Only create the message queue while the server is running #76

Closed matteodelabre closed 2 years ago

matteodelabre commented 3 years ago

Current server behavior is to create the swtfb.01 message queue statically and never clean it. I think it would be useful to add a invariant that the message queue exists if and only if the server is running and accepting requests. This way, external scripts could simply check for the message queue existence to test whether the server has started (see toltec-dev/toltec#455).

This would require two changes:

raisjn commented 3 years ago

I'm not sure about the atexit hook, could it cause open programs to point to a different piece of memory? as long as rm2fb doesn't create shm if the address isn't found, I think it's ok