diff options
Diffstat (limited to 'libgo/go/io/pipe.go')
-rw-r--r-- | libgo/go/io/pipe.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/io/pipe.go b/libgo/go/io/pipe.go index f3f0f175706..f65354a7f25 100644 --- a/libgo/go/io/pipe.go +++ b/libgo/go/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 { |