Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit 6cdb2fa

Browse files
authored
Merge pull request #1301 from Random-Liu/cherrypick-#1156-release-1.1
[release/1.0] Make sure exec process is killed when context is canceled.
2 parents 87beada + d76dcfd commit 6cdb2fa

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/server/container_execsync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func (c *criService) execInContainer(ctx context.Context, id string, opts execOp
131131
defer func() {
132132
deferCtx, deferCancel := ctrdutil.DeferContext()
133133
defer deferCancel()
134-
if _, err := process.Delete(deferCtx); err != nil {
134+
if _, err := process.Delete(deferCtx, containerd.WithProcessKill); err != nil {
135135
logrus.WithError(err).Errorf("Failed to delete exec process %q for container %q", execID, id)
136136
}
137137
}()

0 commit comments

Comments
 (0)