wasm: call __stdio_exit on exit

This flushes stdio, so that functions like puts and printf write out all
buffered data even if the output isn't connected to a terminal.

For discussion, see:
https://github.com/bytecodealliance/wasmtime/issues/7833
This commit is contained in:
Ayke van Laethem
2024-02-16 16:33:07 +01:00
committed by Ron Evans
parent 55f7d21ff5
commit 3021e16bbf
3 changed files with 10 additions and 0 deletions
+1
View File
@@ -18,6 +18,7 @@ func _start() {
wasmNested = true
run()
__stdio_exit()
wasmNested = false
}