summaryrefslogtreecommitdiffhomepage
path: root/pkg/shim/v1/proc/deleted_state.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/shim/v1/proc/deleted_state.go')
-rw-r--r--pkg/shim/v1/proc/deleted_state.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/shim/v1/proc/deleted_state.go b/pkg/shim/v1/proc/deleted_state.go
index 0196c96dd..52aad40ac 100644
--- a/pkg/shim/v1/proc/deleted_state.go
+++ b/pkg/shim/v1/proc/deleted_state.go
@@ -17,33 +17,33 @@ package proc
import (
"context"
+ "fmt"
"github.com/containerd/console"
"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/runtime/proc"
- "github.com/pkg/errors"
)
type deletedState struct{}
func (*deletedState) Resize(ws console.WinSize) error {
- return errors.Errorf("cannot resize a deleted process")
+ return fmt.Errorf("cannot resize a deleted process")
}
func (*deletedState) Start(ctx context.Context) error {
- return errors.Errorf("cannot start a deleted process")
+ return fmt.Errorf("cannot start a deleted process")
}
func (*deletedState) Delete(ctx context.Context) error {
- return errors.Wrap(errdefs.ErrNotFound, "cannot delete a deleted process")
+ return fmt.Errorf("cannot delete a deleted process: %w", errdefs.ErrNotFound)
}
func (*deletedState) Kill(ctx context.Context, sig uint32, all bool) error {
- return errors.Wrap(errdefs.ErrNotFound, "cannot kill a deleted process")
+ return fmt.Errorf("cannot kill a deleted process: %w", errdefs.ErrNotFound)
}
func (*deletedState) SetExited(status int) {}
func (*deletedState) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error) {
- return nil, errors.Errorf("cannot exec in a deleted state")
+ return nil, fmt.Errorf("cannot exec in a deleted state")
}