1
0
mirror of https://github.com/golang/go synced 2024-11-06 08:36:14 -07:00
go/src/os/signal
Elias Naur 78074f6850 runtime: handle SIGPIPE in c-archive and c-shared programs
Before this CL, Go programs in c-archive or c-shared buildmodes
would not handle SIGPIPE. That leads to surprising behaviour where
writes on a closed pipe or socket would raise SIGPIPE and terminate
the program. This CL changes the Go runtime to handle
SIGPIPE regardless of buildmode. In addition, SIGPIPE from non-Go
code is forwarded.

This is a refinement of CL 32796 that fixes the case where a non-default
handler for SIGPIPE is installed by the host C program.

Fixes #17393

Change-Id: Ia41186e52c1ac209d0a594bae9904166ae7df7de
Reviewed-on: https://go-review.googlesource.com/35960
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-02-03 20:07:36 +00:00
..
doc.go runtime: handle SIGPIPE in c-archive and c-shared programs 2017-02-03 20:07:36 +00:00
example_test.go
sig.s
signal_plan9_test.go
signal_plan9.go
signal_test.go
signal_unix.go
signal_windows_test.go
signal.go