mirror of
https://github.com/containerd/containerd.git
synced 2026-11-06 13:27:16 +00:00
When drain_exec_sync_io_timeout is 0 and a child process holds the
pipe, drainExecSyncIO blocks forever even after the client disconnects.
Add ctx.Done() to the select to allow cancellation, and use a deferred
context for Process.Delete cleanup when the original context is already
canceled.
Signed-off-by: Guannan Wang <wgnbuaa@gmail.com>
(cherry picked from commit ff39a97236)
Signed-off-by: Samuel Karp <samuelkarp@google.com>