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 <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
LE Manh Cuong 2019-06-03 15:57:43 +07:00 committed by Ian Lance Taylor
parent cbdf9ade56
commit 0c75eb824c

View File

@ -268,7 +268,7 @@ func setThreadCPUProfiler(hz int32) {
}
func sigpipe() {
if sigsend(_SIGPIPE) {
if signal_ignored(_SIGPIPE) || sigsend(_SIGPIPE) {
return
}
dieFromSignal(_SIGPIPE)