]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: disable epipe check for wasm platform
authorZxilly <zxilly@outlook.com>
Sun, 22 Sep 2024 19:04:36 +0000 (19:04 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 24 Sep 2024 21:08:12 +0000 (21:08 +0000)
Pipe operation seems impossible for wasm build

Fixes #59099

Change-Id: Ibb526693dce4e867dabd92e5ace38a1adf18f401
GitHub-Last-Rev: d7dc3362717f4ddae2c026016812008d25783f4f
GitHub-Pull-Request: golang/go#69583
Reviewed-on: https://go-review.googlesource.com/c/go/+/614935
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/runtime/os_wasm.go

index fbf58439b9c4786c554e3bf0a925129f680b3a90..15bc3131f117c9fc3f592916e7835992cc1de379 100644 (file)
@@ -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) {