Merge pull request #2851 from lifubang/execdpatch

fixes: should no defer when detach
This commit is contained in:
Michael Crosby
2018-12-03 11:22:37 -05:00
committed by GitHub

View File

@@ -94,7 +94,10 @@ var execCommand = cli.Command{
if err != nil { if err != nil {
return err return err
} }
defer process.Delete(ctx) // if detach, we should not call this defer
if !detach {
defer process.Delete(ctx)
}
statusC, err := process.Wait(ctx) statusC, err := process.Wait(ctx)
if err != nil { if err != nil {