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

Method release

host/sysenv/sysenv.cpp:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void FdTable::release(i32_t fd) {
42 auto it = table_.find(fd);
43 if(it == table_.end()) return;
44 FdEntry& e = it->second;
45 if(!e.is_dir && e.os_fd >= 3) {
46 // Never close the host's own stdin/stdout/stderr.
47 WasmVM::sysenv_compat::sys_close(e.os_fd);
48 }
49 // Directory iterator handles release automatically via shared_ptr.
50 table_.erase(it);
51}
52
53// ---- Linear-memory helpers --------------------------------------------------
54//

Callers 2

fs_closeFunction · 0.80
fs_closedirFunction · 0.80

Calls 1

sys_closeFunction · 0.85

Tested by

no test coverage detected