1
0
mirror of https://github.com/golang/go synced 2024-11-25 07:07:57 -07:00

os: turn EPIPE exit into panic

R=iant, r2
CC=golang-dev
https://golang.org/cl/4427042
This commit is contained in:
Russ Cox 2011-04-15 00:01:29 -04:00
parent 29cf90a4ef
commit 6ca71fb897

View File

@ -14,7 +14,7 @@ func epipecheck(file *File, e int) {
if e == syscall.EPIPE {
file.nepipe++
if file.nepipe >= 10 {
Exit(syscall.EPIPE)
panic("os.File Write: caller keeps writing after too many EPIPE errors")
}
} else {
file.nepipe = 0