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
commit 2175efcf99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 {