]> Cypherpunks repositories - gostls13.git/commitdiff
os: turn EPIPE exit into panic
authorRuss Cox <rsc@golang.org>
Fri, 15 Apr 2011 04:01:29 +0000 (00:01 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 15 Apr 2011 04:01:29 +0000 (00:01 -0400)
R=iant, r2
CC=golang-dev
https://golang.org/cl/4427042

src/pkg/os/file_posix.go

index 5151df49873f3cdee420ea13feaf5d2296da70a0..7d96818b7f6ab52a25a47c142a1f091c699ee3d4 100644 (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