From a99107203e4949286e578260f21dce933a4311ed Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 9 Apr 2019 12:53:20 -0700 Subject: [PATCH] Document the preopened file descriptor range. --- docs/WASI-api.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/WASI-api.md b/docs/WASI-api.md index 6cf2886e28..9e82b43e43 100644 --- a/docs/WASI-api.md +++ b/docs/WASI-api.md @@ -1594,7 +1594,10 @@ Used by many functions in this API. 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`). +and `STDERR_FILENO`). Starting at 3 follow a possibly-entry sequence +of preopened file descriptors provided by the host environment; +information about these may be obtained through +[`__wasi_fd_prestat_get()`](#fd_prestat_get). Other than these, WASI implementations are not required to allocate new file descriptors in ascending order.