Skip to content

Commit

Permalink
Merge pull request #7816 from ginglis13/backport-7787
Browse files Browse the repository at this point in the history
[release/1.6] allow client to remove created tasks with PID 0
  • Loading branch information
dmcgowan committed Dec 14, 2022
2 parents 64fa4a0 + d659a4f commit f7e578e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions task.go
Expand Up @@ -310,6 +310,11 @@ func (t *task) Delete(ctx context.Context, opts ...ProcessDeleteOpts) (*ExitStat
// On windows Created is akin to Stopped
break
}
if t.pid == 0 {
// allow for deletion of created tasks with PID 0
// https://github.com/containerd/containerd/issues/7357
break
}
fallthrough
default:
return nil, fmt.Errorf("task must be stopped before deletion: %s: %w", status.Status, errdefs.ErrFailedPrecondition)
Expand Down

0 comments on commit f7e578e

Please sign in to comment.