Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we support inter-process file locking? #23697

Open
sbc100 opened this issue Feb 18, 2025 · 0 comments
Open

Should we support inter-process file locking? #23697

sbc100 opened this issue Feb 18, 2025 · 0 comments

Comments

@sbc100
Copy link
Collaborator

sbc100 commented Feb 18, 2025

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?

sbc100 added a commit to sbc100/emscripten that referenced this issue Feb 18, 2025
This is the current behaviour of the legacy FS so it seems reasonable
to do the same thing, at least for now.

This fixes sqlite which makes use of this fcntl.

See: emscripten-core#23697
Fixes: emscripten-core#23692
sbc100 added a commit that referenced this issue Feb 19, 2025
This is the current behaviour of the legacy FS and the flock function so
it seems reasonable to do the same thing, at least for now. See #23697

This fixes sqlite which makes use of this fcntl to lock the database
when accessing it from multiple different processes.

Fixes: #23692
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant