Skip to content

Commit 74c6f57

Browse files
authored
Merge pull request moby#5106 from tonistiigi/executor-cancel-return
executor: fix cancellation before start signal
2 parents a08a9b6 + 7089987 commit 74c6f57

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

executor/runcexecutor/executor.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,14 @@ func runcProcessHandle(ctx context.Context, killer procKiller) (*procHandle, con
610610
go func() {
611611
// Wait for pid
612612
select {
613-
case <-ctx.Done():
613+
case <-p.ended:
614614
return // nothing to kill
615615
case <-p.ready:
616+
select {
617+
case <-p.ended:
618+
return
619+
default:
620+
}
616621
}
617622

618623
for {

0 commit comments

Comments
 (0)