summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-27 15:07:59 +0000
committerGitHub <noreply@github.com>2021-10-27 15:07:59 +0000
commit6caf5e3b7c08cb3c5b62ed069e458910321b43b2 (patch)
treed6a369cb220c4c914bdf9707a04069664b4461c5 /libpod
parentb29dc1bde3a9b56b813a6ab99c7fea6d7859067f (diff)
parent6b3b0a17c625bdf71b0ec8b783b288886d8e48d7 (diff)
downloadpodman-6caf5e3b7c08cb3c5b62ed069e458910321b43b2.tar.gz
podman-6caf5e3b7c08cb3c5b62ed069e458910321b43b2.tar.bz2
podman-6caf5e3b7c08cb3c5b62ed069e458910321b43b2.zip
Merge pull request #12111 from giuseppe/fix-warning-move-pause-process
runtime: check for pause pid existence
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 855f3a9f9..950ac65eb 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -543,7 +543,11 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) {
return err
}
if became {
- utils.MovePauseProcessToScope(pausePid)
+ // Check if the pause process was created. If it was created, then
+ // move it to its own systemd scope.
+ if _, err = os.Stat(pausePid); err == nil {
+ utils.MovePauseProcessToScope(pausePid)
+ }
os.Exit(ret)
}
}