Allow exec process to be deleted in created state
Fixes #1376 This allows an exec process to be deleted in the created state. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -152,7 +152,8 @@ func (p *process) Delete(ctx context.Context, opts ...ProcessDeleteOpts) (uint32
|
||||
if err != nil {
|
||||
return UnknownExitStatus, err
|
||||
}
|
||||
if status.Status != Stopped {
|
||||
switch status.Status {
|
||||
case Running, Paused, Pausing:
|
||||
return UnknownExitStatus, errors.Wrapf(errdefs.ErrFailedPrecondition, "process must be stopped before deletion")
|
||||
}
|
||||
if p.io != nil {
|
||||
|
Reference in New Issue
Block a user