Skip to content

File::lock does not work on Android #148325

@RalfJung

Description

@RalfJung

Currently, our lock method just always errors on Android.

However, the libc crate does expose flock on Android, and cargo-bins/cargo-binstall#2330 sounds like there is support for flock on Android with fs4, at least for some Android versions.

We should figure out which Android versions have flock, and whether we can use that for the standard library API.

(Also see #146312 which is a similar issue for Illumos.)

Cc @chriswailes @maurer @mgeisler @tgross35

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`O-androidOperating system: AndroidT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions