summaryrefslogtreecommitdiff
path: root/src/pkg/io/pipe.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/io/pipe.go')
-rw-r--r--src/pkg/io/pipe.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pkg/io/pipe.go b/src/pkg/io/pipe.go
index 1a443ddce..729094fde 100644
--- a/src/pkg/io/pipe.go
+++ b/src/pkg/io/pipe.go
@@ -104,6 +104,9 @@ func (p *pipe) CloseReader(rerr os.Error) os.Error {
}
func (p *pipe) CloseWriter(werr os.Error) os.Error {
+ if werr == nil {
+ werr = os.EOF;
+ }
if p == nil || p.wclosed {
return os.EINVAL;
}