diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-03-04 11:11:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-04 11:11:01 -0500 |
commit | 83895524959750e16da2fd43b9da6389b4e20b46 (patch) | |
tree | ece55b81c619e8f0a3ef004f588515e52d79eec1 /libpod/oci.go | |
parent | ce7ed2205a6a2a4557b14a3e1e818839c7c8bbfd (diff) | |
parent | d3d97a25e8c87cf741b2e24ac01ef84962137106 (diff) | |
download | podman-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/oci.go')
-rw-r--r-- | libpod/oci.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libpod/oci.go b/libpod/oci.go index 2ea61851f..e5f9b2135 100644 --- a/libpod/oci.go +++ b/libpod/oci.go @@ -70,7 +70,7 @@ type OCIRuntime interface { // ExecContainer executes a command in a running container. // Returns an int (exit code), error channel (errors from attach), and // error (errors that occurred attempting to start the exec session). - ExecContainer(ctr *Container, sessionID string, options *ExecOptions) (int, chan error, error) + ExecContainer(ctr *Container, sessionID string, options *ExecOptions) (chan DataAndErr, chan error, error) // ExecStopContainer stops a given exec session in a running container. // SIGTERM with be sent initially, then SIGKILL after the given timeout. // If timeout is 0, SIGKILL will be sent immediately, and SIGTERM will @@ -159,3 +159,10 @@ type HTTPAttachStreams struct { Stdout bool Stderr bool } + +// DataAndErr is a generic structure for passing around an int and an error +// it is especially useful for getting information from conmon +type DataAndErr struct { + data int + err error +} |