Skip to content

Should we support inter-process file locking? #23697

Open

Description

@sbc100

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?

Activity

  1. brandonpayton commented on Apr 22, 2025

    @brandonpayton
    Contributor

    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.

  2. adamziel commented on Jul 5, 2025

    @adamziel

    To close the loop, @brandonpayton implemented fcntl() for WordPress Playground's PHP.wasm in WordPress/wordpress-playground#2231

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions