Skip to content

Commit 5583cb5

Browse files
ianlancetaylorromaindoumenc
authored andcommitted
os/signal: document behavior of SIGPIPE on non-Go thread
Fixes golang#56150 Change-Id: Id990783562950ba8be7ce9526b7a811625f2190a Reviewed-on: https://go-review.googlesource.com/c/go/+/442415 Run-TryBot: Ian Lance Taylor <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Michael Pratt <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]>
1 parent 36ef574 commit 5583cb5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/os/signal/doc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ signal, and raises it again, to invoke any non-Go handler or default
164164
system handler. If the program does not exit, the Go handler then
165165
reinstalls itself and continues execution of the program.
166166
167+
If a SIGPIPE signal is received, the Go program will invoke the
168+
special handling described above if the SIGPIPE is received on a Go
169+
thread. If the SIGPIPE is received on a non-Go thread the signal will
170+
be forwarded to the non-Go handler, if any; if there is none the
171+
default system handler will cause the program to terminate.
172+
167173
# Non-Go programs that call Go code
168174
169175
When Go code is built with options like -buildmode=c-shared, it will

0 commit comments

Comments
 (0)