summaryrefslogtreecommitdiff
path: root/libpod/oci_conmon_linux.go
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2020-04-03 07:51:18 +0000
committerAdrian Reber <areber@redhat.com>2020-04-03 18:00:57 +0200
commit7660330ae22792d993d0b94c9be8417c7e848cb6 (patch)
treeda35d4d63f076b09a72f9790efbe2d7ce0e6acc4 /libpod/oci_conmon_linux.go
parentccf0e0dd042d8a8d23dd0021ee267e7c9da9ff4a (diff)
downloadpodman-7660330ae22792d993d0b94c9be8417c7e848cb6.tar.gz
podman-7660330ae22792d993d0b94c9be8417c7e848cb6.tar.bz2
podman-7660330ae22792d993d0b94c9be8417c7e848cb6.zip
checkpoint: change runtime checkpoint support test
Podman was checking if the runtime support checkpointing by running 'runtime checkpoint -h'. That works for runc. crun, however, does not use '-h, --help' for help output but, '-?, --help'. This commit switches both checkpoint support detection from 'runtime checkpoint -h' to 'runtime checkpoint --help'. Podman can now correctly detect if 'crun' also support checkpointing. Signed-off-by: Adrian Reber <areber@redhat.com>
Diffstat (limited to 'libpod/oci_conmon_linux.go')
-rw-r--r--libpod/oci_conmon_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/oci_conmon_linux.go b/libpod/oci_conmon_linux.go
index 6a0097b8e..e7cb99547 100644
--- a/libpod/oci_conmon_linux.go
+++ b/libpod/oci_conmon_linux.go
@@ -939,7 +939,7 @@ func (r *ConmonOCIRuntime) CheckpointContainer(ctr *Container, options Container
func (r *ConmonOCIRuntime) SupportsCheckpoint() bool {
// Check if the runtime implements checkpointing. Currently only
// runc's checkpoint/restore implementation is supported.
- cmd := exec.Command(r.path, "checkpoint", "-h")
+ cmd := exec.Command(r.path, "checkpoint", "--help")
if err := cmd.Start(); err != nil {
return false
}