]> Cypherpunks repositories - gostls13.git/commit
runtime: don't forward SIGPIPE on macOS
authorElias Naur <mail@eliasnaur.com>
Wed, 31 Jul 2019 12:33:57 +0000 (14:33 +0200)
committerElias Naur <mail@eliasnaur.com>
Thu, 29 Aug 2019 12:51:31 +0000 (12:51 +0000)
commitd56a86e01f2e771a4706f0a5cfbe2d87cd888f05
tree110c8115facb5e2161f13aa6df7b7d33de3ac531
parent5cf5a6fc5eca5e05ab7cd189a19196e73c5408c4
runtime: don't forward SIGPIPE on macOS

macOS and iOS deliver SIGPIPE signals to the main thread and not
the thread that raised it by writing to a closed socket or pipe.

SIGPIPE signals can be suppressed for sockets with the SO_NOSIGPIPE
option, but there is no similar option for pipes. We have no other
choice but to never forward SIGPIPE on macOS.

Fixes #33384

Change-Id: Ice3de75b121f00006ee11c26d560e619536460be
Reviewed-on: https://go-review.googlesource.com/c/go/+/188297
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/testcarchive/testdata/main3.c
src/runtime/signal_unix.go