Skip to content

how are preopened fds numbered? #10

@wanderer

Description

@wanderer

I'm confused on how preopened fds are numbered. The API doc currently says

As in POSIX, three file descriptor numbers are provided to instances on startup -- 0, 1, and 2, (a.k.a. STDIN_FILENO, STDOUT_FILENO, and STDERR_FILENO).

Other than these, WASI implementations are not required to allocate new file descriptors in ascending order.

So how do programs find the preopened fds? Wasmtime currently seems to monotonically increment the fds. Should this be considered part of the spec?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions