aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/signal_unix.go
diff options
context:
space:
mode:
authorLE Manh Cuong <cuong.manhle.vn@gmail.com>2019-06-03 15:57:43 +0700
committerIan Lance Taylor <iant@golang.org>2019-06-03 20:07:50 +0000
commit0c75eb824ca7ca41970c2265ad1bccb82bbb408f (patch)
treeef6677ce9dba714f70c347cf94ba977a27b4ff6d /src/runtime/signal_unix.go
parentcbdf9ade5604917593af3ce5ce576a465edfca83 (diff)
downloadgo-0c75eb824ca7ca41970c2265ad1bccb82bbb408f.tar.gz
go-0c75eb824ca7ca41970c2265ad1bccb82bbb408f.zip
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>
Diffstat (limited to 'src/runtime/signal_unix.go')
-rw-r--r--src/runtime/signal_unix.go2
1 files changed, 1 insertions, 1 deletions
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)