diff --git a/pkg/cmd/container/exec.go b/pkg/cmd/container/exec.go index 0c087e63782..c874a4d1087 100644 --- a/pkg/cmd/container/exec.go +++ b/pkg/cmd/container/exec.go @@ -134,6 +134,10 @@ func execActionWithContainer(ctx context.Context, client *containerd.Client, con return nil } status := <-statusC + + process.IO().Wait() + process.IO().Close() + code, _, err := status.Result() if err != nil { return err