os, runtime: better EPIPE behavior for command line programs
Old behavior: 10 consecutive EPIPE errors on any descriptor cause the program to exit with a SIGPIPE signal. New behavior: an EPIPE error on file descriptors 1 or 2 cause the program to raise a SIGPIPE signal. If os/signal.Notify was not used to catch SIGPIPE signals, this will cause the program to exit with SIGPIPE. An EPIPE error on a file descriptor other than 1 or 2 will simply be returned from Write. Fixes #11845. Update #9896. Change-Id: Ic85d77e386a8bb0255dc4be1e4b3f55875d10f18 Reviewed-on: https://go-review.googlesource.com/18151Reviewed-by: Russ Cox <rsc@golang.org>
Showing
src/os/pipe_test.go
0 → 100644
Please register or sign in to comment