Merge pull request #276 from resouer/fix-fd

Fix controlPipe is not closed
This commit is contained in:
Kenfe-Mickaël Laventure 2016-07-05 11:25:07 -07:00 committed by GitHub
commit af3c4bd9c5

View file

@ -211,7 +211,11 @@ func (p *process) Stdio() Stdio {
// Close closes any open files and/or resouces on the process
func (p *process) Close() error {
return p.exitPipe.Close()
err := p.exitPipe.Close()
if cerr := p.controlPipe.Close(); err == nil {
err = cerr
}
return err
}
func (p *process) State() State {