Skip to content

Support for converting OpenOptions to c_int on UNIX #74943

Open

Description

@withoutboats

AFAICT, there's no public API for converting OpenOptions to c_int on UNIX platforms, meaning you cannot use an OpenOptions to open a file yourself using a lower level API from C. For example, this means that I cannot just re-use the OpenOptions type from std in ringbahn, which opens a file using io-uring instead of using the open syscall.

Some way under std::os::unix to convert OpenOptions to c_int would be helpful to avoid duplication. Ideally it would be a method on OpenOptionsExt, but I'm not sure how that could be non-breaking since there is no obvious default implementation. It may just have to be a free function.

Activity

  1. added
    T-libs-api[DEPRECATED; DO NOT USE]
    A-ioArea: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path)
    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
    on Jul 30, 2020
  2. added a commit that references this issue on Sep 22, 2020
    e0bc267
  3. Dylan-DPC-zz commented on Sep 23, 2020

    @Dylan-DPC-zz

    Reopening this because it is being reverted in #77090

  4. added
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    and removed
    T-libs-api[DEPRECATED; DO NOT USE]
    on Aug 12, 2026
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

    A-ioArea: `std::io` (note: `std::fs`, `std::net`, `std::path` are A-filesystem, A-net, A-path)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-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