summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-06-05 15:34:04 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-06-11 11:01:13 +0200
commitb4a410215ef0d6ebac6e5b61921f2cbe5d9ac8bd (patch)
tree15a613073a96a299e7303b694dbf8ae06d7d052f /libpod
parent557a9c12111f8bebaf1466bc267ef8cb992d1c19 (diff)
downloadpodman-b4a410215ef0d6ebac6e5b61921f2cbe5d9ac8bd.tar.gz
podman-b4a410215ef0d6ebac6e5b61921f2cbe5d9ac8bd.tar.bz2
podman-b4a410215ef0d6ebac6e5b61921f2cbe5d9ac8bd.zip
add (*Pod).CreateCommand()
Add a method to Pod to easily access its .config.CreateCommand. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/pod.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/pod.go b/libpod/pod.go
index 7af78fa07..db87e60f2 100644
--- a/libpod/pod.go
+++ b/libpod/pod.go
@@ -129,6 +129,12 @@ func (p *Pod) CreatedTime() time.Time {
return p.config.CreatedTime
}
+// CreateCommand returns the os.Args of the process with which the pod has been
+// created.
+func (p *Pod) CreateCommand() []string {
+ return p.config.CreateCommand
+}
+
// CgroupParent returns the pod's CGroup parent
func (p *Pod) CgroupParent() string {
return p.config.CgroupParent