MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / WasmEdge_ModuleInstanceWASIGetExitCode

Function WasmEdge_ModuleInstanceWASIGetExitCode

lib/api/wasmedge.cpp:2437–2448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2435}
2436
2437WASMEDGE_CAPI_EXPORT uint32_t WasmEdge_ModuleInstanceWASIGetExitCode(
2438 const WasmEdge_ModuleInstanceContext *Cxt) noexcept {
2439 if (!Cxt) {
2440 return EXIT_FAILURE;
2441 }
2442 auto *WasiMod =
2443 dynamic_cast<const WasmEdge::Host::WasiModule *>(fromModCxt(Cxt));
2444 if (!WasiMod) {
2445 return EXIT_FAILURE;
2446 }
2447 return WasiMod->getExitCode();
2448}
2449
2450WASMEDGE_CAPI_EXPORT void
2451WasmEdge_ModuleInstanceInitWasmEdgeProcess(const char *const *AllowedCmds,

Callers 1

TESTFunction · 0.85

Calls 1

getExitCodeMethod · 0.45

Tested by 1

TESTFunction · 0.68