summaryrefslogtreecommitdiff
path: root/libpod/define/exec_codes.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-04 11:11:01 -0500
committerGitHub <noreply@github.com>2020-03-04 11:11:01 -0500
commit83895524959750e16da2fd43b9da6389b4e20b46 (patch)
treeece55b81c619e8f0a3ef004f588515e52d79eec1 /libpod/define/exec_codes.go
parentce7ed2205a6a2a4557b14a3e1e818839c7c8bbfd (diff)
parentd3d97a25e8c87cf741b2e24ac01ef84962137106 (diff)
downloadpodman-83895524959750e16da2fd43b9da6389b4e20b46.tar.gz
podman-83895524959750e16da2fd43b9da6389b4e20b46.tar.bz2
podman-83895524959750e16da2fd43b9da6389b4e20b46.zip
Merge pull request #5373 from haircommander/exec-pipe-ec
exec: get the exit code from sync pipe instead of file
Diffstat (limited to 'libpod/define/exec_codes.go')
-rw-r--r--libpod/define/exec_codes.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/define/exec_codes.go b/libpod/define/exec_codes.go
index f94616b33..c2ec08666 100644
--- a/libpod/define/exec_codes.go
+++ b/libpod/define/exec_codes.go
@@ -1,6 +1,7 @@
package define
import (
+ "math"
"strings"
"github.com/pkg/errors"
@@ -17,6 +18,11 @@ const (
ExecErrorCodeCannotInvoke = 126
// ExecErrorCodeNotFound is the error code to return when a command cannot be found
ExecErrorCodeNotFound = 127
+ // ErrorConmonRead is a bogus value that can neither be a valid PID or exit code. It is
+ // used because conmon will send a negative value when sending a PID back over a pipe FD
+ // to signify something went wrong in the runtime. We need to differentiate between that
+ // value and a failure on the podman side of reading that value. Thus, we use ErrorConmonRead
+ ErrorConmonRead = math.MinInt32 - 1
)
// TranslateExecErrorToExitCode takes an error and checks whether it