summaryrefslogtreecommitdiff
path: root/libpod/container_exec.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-05-18 14:37:09 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-05-20 16:11:05 -0400
commite7f4e98c450e2381c70109b308591853f9ac909e (patch)
treea1794a9ecb248a891e52898cd69a9895609f95ec /libpod/container_exec.go
parent6a75dfa8a85d7b9677f545aba976dbe82404cf3d (diff)
downloadpodman-e7f4e98c450e2381c70109b308591853f9ac909e.tar.gz
podman-e7f4e98c450e2381c70109b308591853f9ac909e.tar.bz2
podman-e7f4e98c450e2381c70109b308591853f9ac909e.zip
Add exit commands to exec sessions
These are required for detached exec, where they will be used to clean up and remove exec sessions when they exit. As part of this, move all Exec related functionality for the Conmon OCI runtime into a separate file; the existing one was around 2000 lines. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/container_exec.go')
-rw-r--r--libpod/container_exec.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/container_exec.go b/libpod/container_exec.go
index 6ad767b4b..088bd0fd5 100644
--- a/libpod/container_exec.go
+++ b/libpod/container_exec.go
@@ -62,6 +62,10 @@ type ExecConfig struct {
// given is the number that will be passed into the exec session,
// starting at 3.
PreserveFDs uint `json:"preserveFds,omitempty"`
+ // ExitCommand is the exec session's exit command.
+ // This command will be executed when the exec session exits.
+ // If unset, no command will be executed.
+ ExitCommand []string `json:"exitCommand,omitempty"`
}
// ExecSession contains information on a single exec session attached to a given