From 7a713151fd4315f0b41f6f0ad4bc5201ce2186b1 Mon Sep 17 00:00:00 2001 From: SirJosh3917 Date: Tue, 22 Sep 2020 14:21:43 -0400 Subject: [PATCH] solve ordering of stdin, stdout, stderr. --- design/file-descriptors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design/file-descriptors.md b/design/file-descriptors.md index 27d3114a..b611a0b8 100644 --- a/design/file-descriptors.md +++ b/design/file-descriptors.md @@ -2,7 +2,7 @@ File Descriptors ([witx type `fd`](https://github.com/WebAssembly/WASI/blob/master/phases/snapshot/docs.md#-fd)), often referred to as "handles" interchangeably, are an abstract way of representing access to a resource. More often than not, they are processes (WIP), sockets (WIP), files, or even the console. ## The Console -When a program is initiated, `stdout`, `stdin`, and `stderr` (respectively `fd` ids `0`, `1`, and `2`) are opened. To print to these, simply call `fd_write` with the corresponding arguments. An simple "Hello World!" program written in `wat` is shown below, [sourced from the wasmtime test suite](https://github.com/bytecodealliance/wasmtime/blob/main/tests/wasm/hello_wasi_snapshot1.wat): +When a program is initiated, `stdin`, `stdout`, and `stderr` (respectively `fd` ids `0`, `1`, and `2`) are opened. To print to these, simply call `fd_write` with the corresponding arguments. An simple "Hello World!" program written in `wat` is shown below, [sourced from the wasmtime test suite](https://github.com/bytecodealliance/wasmtime/blob/main/tests/wasm/hello_wasi_snapshot1.wat): ```wat (module