mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-10 18:00:18 +02:00
Instead of watching to ensure our parent process is still alive. Mount the squashfs once and use a combination of file leases and inotify to ref count how many processes are using the rootfs. This makes it so in the common case, the FEXMountDaemon only ever executes once and runs until all FEX processes stop running. In the rare edge case there is a race condition where multiple FEXMountDaemon applications will start, but only one will end up mounting the squashfs. In this case, one application wins and the one that failed to grab the lease will wait until the other one completes. With this change, squashfs should be reasonable to use now.