MCPcopy Create free account
hub / github.com/WasmVM/WasmVM / FdTable

Method FdTable

host/sysenv/sysenv.cpp:16–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14FdTable fd_table;
15
16FdTable::FdTable() {
17 // Pre-open stdin / stdout / stderr so wasm fd 0/1/2 map to the host's.
18 table_[0] = FdEntry{0, false, nullptr};
19 table_[1] = FdEntry{1, false, nullptr};
20 table_[2] = FdEntry{2, false, nullptr};
21}
22
23i32_t FdTable::alloc(int os_fd) {
24 i32_t wfd = next_fd_++;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected