Open btzy opened 6 years ago
6c5f04b1e8309a945078e23f0b42dcd952b46fdb introduces reference counting for the POSIX shared memory. It fixes the bug for the sequence of actions above, and it works as intended as long as Circuit Sandbox does not crash or exit in an abnormal manner. If it crashes or exits abnormally, the reference count will not be decremented and the shared memory will not be removed until the system is rebooted (because POSIX shared memory has kernel persistence).
See how Boost.Interprocess and shm_unlink works.