1
0
mirror of https://github.com/golang/go synced 2024-11-24 08:20:03 -07:00
go/misc/cgo
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
..
errors cmd/cgo: run cgo pointer checks for pointer to union 2016-11-15 17:10:52 +00:00
fortran
gmp
life
nocgo
stdio
test misc/cgo/test: pass current environment to syscall.Exec 2017-01-20 21:12:54 +00:00
testasan
testcarchive runtime: handle SIGPIPE in c-archive and c-shared programs 2017-02-03 20:07:36 +00:00
testcshared misc/cgo/testcshared: wait up to 1 second in main2.c 2016-12-20 05:06:55 +00:00
testgodefs cmd/cgo: add -srcdir option 2016-10-30 19:14:08 +00:00
testplugin runtime: for plugins, don't add duplicate itabs 2017-01-17 22:37:19 +00:00
testsanitizers runtime: check for nil g and m in msanread 2017-01-19 23:06:54 +00:00
testshared misc/cgo/testshared: remove unused flag.Parse() 2017-02-02 13:40:16 +00:00
testsigfwd
testso
testsovar
testtls