1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 14:48:55 +00:00

Close streams properly

This commit is contained in:
Darren Shepherd
2016-08-22 09:55:52 -07:00
parent 8d79d67ca4
commit 42d966bd52
3 changed files with 5 additions and 1 deletions

View File

@@ -59,6 +59,9 @@ func (c *Cmd) Start() error {
}
func (c *Cmd) Wait() error {
// c.Cmd.Wait() will always error because there is no child process anymore
// This is called to ensure that the streams are closed and cleaned up properly
defer c.Cmd.Wait()
if c.sub == nil {
return c.err
}