From: Ian Lance Taylor Date: Tue, 11 Oct 2022 22:09:02 +0000 (-0700) Subject: os/signal: document behavior of SIGPIPE on non-Go thread X-Git-Tag: go1.20rc1~659 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1a7f08cf408ff4c4f05be25839a0d7c5ec28ed05;p=gostls13.git os/signal: document behavior of SIGPIPE on non-Go thread Fixes #56150 Change-Id: Id990783562950ba8be7ce9526b7a811625f2190a Reviewed-on: https://go-review.googlesource.com/c/go/+/442415 Run-TryBot: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Michael Pratt TryBot-Result: Gopher Robot Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor --- diff --git a/src/os/signal/doc.go b/src/os/signal/doc.go index ab262edc58..1b9f40d9a8 100644 --- a/src/os/signal/doc.go +++ b/src/os/signal/doc.go @@ -164,6 +164,12 @@ signal, and raises it again, to invoke any non-Go handler or default system handler. If the program does not exit, the Go handler then reinstalls itself and continues execution of the program. +If a SIGPIPE signal is received, the Go program will invoke the +special handling described above if the SIGPIPE is received on a Go +thread. If the SIGPIPE is received on a non-Go thread the signal will +be forwarded to the non-Go handler, if any; if there is none the +default system handler will cause the program to terminate. + # Non-Go programs that call Go code When Go code is built with options like -buildmode=c-shared, it will