Skip to content

Commit 02cfb57

Browse files
authored
Merge pull request containerd#4392 from swagatbora90/wait_for_process_io
exec: wait for I/O completion before return
2 parents 0b89b6b + a59d0ac commit 02cfb57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/cmd/container/exec.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ func execActionWithContainer(ctx context.Context, client *containerd.Client, con
134134
return nil
135135
}
136136
status := <-statusC
137+
138+
process.IO().Wait()
139+
process.IO().Close()
140+
137141
code, _, err := status.Result()
138142
if err != nil {
139143
return err

0 commit comments

Comments
 (0)