From d7dc3362717f4ddae2c026016812008d25783f4f Mon Sep 17 00:00:00 2001 From: Zxilly Date: Mon, 23 Sep 2024 02:48:35 +0800 Subject: [PATCH] runtime: disable epipe check for wasm platform Pipe operation seems impossible for wasm build --- src/runtime/os_wasm.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/os_wasm.go b/src/runtime/os_wasm.go index fbf58439b9c47..15bc3131f117c 100644 --- a/src/runtime/os_wasm.go +++ b/src/runtime/os_wasm.go @@ -109,10 +109,10 @@ func newosproc(mp *m) { throw("newosproc: not implemented") } +// Do nothing on WASM platform, always return EPIPE to caller. +// //go:linkname os_sigpipe os.sigpipe -func os_sigpipe() { - throw("too many writes on closed pipe") -} +func os_sigpipe() {} //go:linkname syscall_now syscall.now func syscall_now() (sec int64, nsec int32) {