mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-07 20:43:40 +00:00
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:
committed by
Ron Evans
parent
55f7d21ff5
commit
3021e16bbf
@@ -19,6 +19,7 @@ func _start() {
|
||||
heapStart = uintptr(unsafe.Pointer(&heapStartSymbol))
|
||||
heapEnd = uintptr(wasm_memory_size(0) * wasmPageSize)
|
||||
run()
|
||||
__stdio_exit()
|
||||
}
|
||||
|
||||
// Read the command line arguments from WASI.
|
||||
|
||||
Reference in New Issue
Block a user