From: LE Manh Cuong Date: Mon, 3 Jun 2019 08:57:43 +0000 (+0700) Subject: runtime: fix sigpipe do not check SIGPIPE was ignored X-Git-Tag: go1.13beta1~154 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0c75eb824ca7ca41970c2265ad1bccb82bbb408f;p=gostls13.git runtime: fix sigpipe do not check SIGPIPE was ignored Fixes #32386 Change-Id: I29ad4113b02264336eebe7865895f07ef386f450 Reviewed-on: https://go-review.googlesource.com/c/go/+/180177 Run-TryBot: Cuong Manh Le TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index 1dd56989b4..f34008ff5f 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -268,7 +268,7 @@ func setThreadCPUProfiler(hz int32) { } func sigpipe() { - if sigsend(_SIGPIPE) { + if signal_ignored(_SIGPIPE) || sigsend(_SIGPIPE) { return } dieFromSignal(_SIGPIPE)