Fix fd leak
Signed-off-by: Harry Zhang <harryzhang@zju.edu.cn> Signed-off-by: Harry Zhang <harryz@hyper.sh>
This commit is contained in:
parent
a8c73b6959
commit
2ef56b2ee8
1 changed files with 5 additions and 1 deletions
|
@ -201,7 +201,11 @@ func (p *process) Stdio() Stdio {
|
||||||
|
|
||||||
// Close closes any open files and/or resouces on the process
|
// Close closes any open files and/or resouces on the process
|
||||||
func (p *process) Close() error {
|
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 {
|
func (p *process) State() State {
|
||||||
|
|
Loading…
Reference in a new issue