should no defer when detach

Signed-off-by: Lifubang <lifubang@acmcoder.com>
This commit is contained in:
Lifubang 2018-12-03 18:31:21 +08:00
parent 09a5b1f8af
commit 2d3a4f99ec

View File

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