linux, linux/shim: remove error definitions
Since we now have a common set of error definitions, mapped to existing error codes, we no longer need the specialized error codes used for interaction with linux processes. The main issue was that string matching was being used to map these to useful error codes. With this change, we use errors defined in the `errdefs` package, which map cleanly to GRPC error codes and are recoverable on either side of the request. The main focus of this PR was in removin these from the shim. We may need follow ups to ensure error codes are preserved by the `Tasks` service. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
@@ -164,7 +164,7 @@ func (e *execProcess) Resize(ws console.WinSize) error {
|
||||
|
||||
func (e *execProcess) Kill(ctx context.Context, sig uint32, _ bool) error {
|
||||
if err := unix.Kill(e.pid, syscall.Signal(sig)); err != nil {
|
||||
return checkKillError(err)
|
||||
return errors.Wrapf(checkKillError(err), "exec kill error")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user