blob: 73da2770a0aa8574960d79bfaa464ff9fb5f620e [file] [log] [blame]
Copyright 2020 The Monogon Project Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
From d926d6f44be46c7dbc932247c0cd3daf6a34586f Mon Sep 17 00:00:00 2001
From: Lorenz Brun <lorenz@brun.one>
Date: Mon, 4 May 2020 15:16:58 +0200
Subject: [PATCH] Remove unreachable code
Going upstream as https://github.com/google/gvisor-containerd-shim/pull/59
---
pkg/v1/proc/deleted_state.go | 2 --
1 file changed, 2 deletions(-)
diff --git a/pkg/v1/proc/deleted_state.go b/pkg/v1/proc/deleted_state.go
index 95b4406..b023384 100644
--- a/pkg/v1/proc/deleted_state.go
+++ b/pkg/v1/proc/deleted_state.go
@@ -38,12 +38,10 @@ func (s *deletedState) Start(ctx context.Context) error {
}
func (s *deletedState) Delete(ctx context.Context) error {
- return errors.Errorf("cannot delete a deleted process")
return errors.Wrap(errdefs.ErrNotFound, "cannot delete a deleted process")
}
func (s *deletedState) Kill(ctx context.Context, sig uint32, all bool) error {
- return errors.Errorf("cannot kill a deleted process")
return errors.Wrap(errdefs.ErrNotFound, "cannot kill a deleted process")
}
--
2.25.1