]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix sigpipe do not check SIGPIPE was ignored
authorLE Manh Cuong <cuong.manhle.vn@gmail.com>
Mon, 3 Jun 2019 08:57:43 +0000 (15:57 +0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 3 Jun 2019 20:07:50 +0000 (20:07 +0000)
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>
src/runtime/signal_unix.go

index 1dd56989b48fd5dc74e100202d90e3fe03d4a3ad..f34008ff5ffdf6645a26f004f3fac6bc305430a6 100644 (file)
@@ -268,7 +268,7 @@ func setThreadCPUProfiler(hz int32) {
 }
 
 func sigpipe() {
-       if sigsend(_SIGPIPE) {
+       if signal_ignored(_SIGPIPE) || sigsend(_SIGPIPE) {
                return
        }
        dieFromSignal(_SIGPIPE)