Should we support inter-process file locking?
Right now we simply stub out calls like flock and fcntl+F_SETLK.
At least for the OPFS wasmfs backend it seems like it could be usefull?
I assume that the OPFS filesystem can be shared between multiple running emscripten programs? (or the same program running in multiple tabs?)
Are there any other FS backends that could benefit?
This is something we are exploring with WordPress Playground for use with NODEFS (currently with the legacy FS).
I prototyped an async override for fcntl() to support F_GETLK and F_SETLK so multiple manually-created php-wasm workers could share a SQLite DB file without corruption.
To close the loop, @brandonpayton implemented fcntl() for WordPress Playground's PHP.wasm in https://github.com/WordPress/wordpress-playground/pull/2231