Lorenz Brun | c88c82d | 2020-05-08 14:35:04 +0200 | [diff] [blame^] | 1 | Copyright 2020 The Monogon Project Authors. |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License. |
| 14 | |
| 15 | |
| 16 | From d926d6f44be46c7dbc932247c0cd3daf6a34586f Mon Sep 17 00:00:00 2001 |
| 17 | From: Lorenz Brun <lorenz@brun.one> |
| 18 | Date: Mon, 4 May 2020 15:16:58 +0200 |
| 19 | Subject: [PATCH] Remove unreachable code |
| 20 | |
| 21 | Going upstream as https://github.com/google/gvisor-containerd-shim/pull/59 |
| 22 | |
| 23 | --- |
| 24 | pkg/v1/proc/deleted_state.go | 2 -- |
| 25 | 1 file changed, 2 deletions(-) |
| 26 | |
| 27 | diff --git a/pkg/v1/proc/deleted_state.go b/pkg/v1/proc/deleted_state.go |
| 28 | index 95b4406..b023384 100644 |
| 29 | --- a/pkg/v1/proc/deleted_state.go |
| 30 | +++ b/pkg/v1/proc/deleted_state.go |
| 31 | @@ -38,12 +38,10 @@ func (s *deletedState) Start(ctx context.Context) error { |
| 32 | } |
| 33 | |
| 34 | func (s *deletedState) Delete(ctx context.Context) error { |
| 35 | - return errors.Errorf("cannot delete a deleted process") |
| 36 | return errors.Wrap(errdefs.ErrNotFound, "cannot delete a deleted process") |
| 37 | } |
| 38 | |
| 39 | func (s *deletedState) Kill(ctx context.Context, sig uint32, all bool) error { |
| 40 | - return errors.Errorf("cannot kill a deleted process") |
| 41 | return errors.Wrap(errdefs.ErrNotFound, "cannot kill a deleted process") |
| 42 | } |
| 43 | |
| 44 | -- |
| 45 | 2.25.1 |
| 46 | |