Permalink
Browse files

Bugfix: remove extraneous close

The *os.File created above will already take care of closing the underlying file
descriptor.

The extra close was harmless at best, and introducing test hangs at worst, as
reported in https://bugs.debian.org/907828: if the *os.File close doesn’t result
in -EBADF, but rather closes an open file descriptor such as the stderr pipe to
mandoc, we would hang forever in waiting for stderr to close.
  • Loading branch information...
stapelberg committed Sep 5, 2018
1 parent 78b1346 commit 9955035c25122f294986a9340d0c0946527de4ed
Showing with 0 additions and 4 deletions.
  1. +0 −4 internal/convert/mandoc.go
@@ -67,10 +67,6 @@ func (p *Process) initMandoc() error {
return err
}

if err := syscall.Close(pair[1]); err != nil {
return err
}

p.stopWait = make(chan bool)
go func() {
wait := make(chan error, 1)

0 comments on commit 9955035

Please sign in to comment.