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.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/io/pipe.go b/src/pkg/io/pipe.go
index f3f0f1757..f65354a7f 100644
--- a/src/pkg/io/pipe.go
+++ b/src/pkg/io/pipe.go
@@ -74,6 +74,10 @@ func (p *pipe) write(b []byte) (n int, err error) {
p.l.Lock()
defer p.l.Unlock()
+ if p.werr != nil {
+ err = ErrClosedPipe
+ return
+ }
p.data = b
p.rwait.Signal()
for {