Skip to content

Commit cf7ad68

Browse files
author
Jackie Li
committed
close stdout & stderr
1 parent 220d177 commit cf7ad68

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/runner.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ func (r *runner) runBin() error {
115115

116116
go io.Copy(r.writer, stdout)
117117
go io.Copy(r.writer, stderr)
118-
go r.command.Wait()
119-
118+
go func() {
119+
r.command.Wait()
120+
stdout.Close()
121+
stderr.Close()
122+
}()
120123
return nil
121124
}
122125

0 commit comments

Comments
 (0)