mirror of
https://github.com/moby/buildkit.git
synced 2026-07-01 04:07:10 +00:00
Deleting a containerd task whose status is Created fails with a "precondition failed" error. This is because (aside from Windows) a process is spawned when the task is created, and deleting the task while the process is running would leak the process if it was allowed. Change the deferred `task.Delete` call to pass the `WithProcessKill` delete option so the cleanup has a chance to succeed in the event that the `p.Start` call inside `runProcess` returns an error. Signed-off-by: Cory Snider <csnider@mirantis.com>