windows: Close IO if process in created state

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-08-22 20:45:22 +00:00
committed by Michael Crosby
parent 1b470c180e
commit fc535efe58
2 changed files with 11 additions and 4 deletions

View File

@@ -240,6 +240,13 @@ func (t *task) DeleteProcess(ctx context.Context, id string) (*runtime.Exit, err
if err != nil {
return nil, err
}
// If we never started the process close the pipes
if p.Status() == runtime.CreatedStatus {
p.io.Close()
ea = time.Now()
}
t.removeProcess(id)
return &runtime.Exit{
Pid: p.pid,