summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorchenkang <kongchen28@gmail.com>2021-04-17 21:15:08 +0800
committerchenkang <kongchen28@gmail.com>2021-04-17 21:15:23 +0800
commit728b73d7c4186f4f0f9431d84ec2c5883f38ff20 (patch)
tree917689e3cdfed01dd964fdc7d0077a4dee1ca3a0 /libpod/runtime_ctr.go
parentb963a5eb4a62688d3fc5c11815bc626055201187 (diff)
downloadpodman-728b73d7c4186f4f0f9431d84ec2c5883f38ff20.tar.gz
podman-728b73d7c4186f4f0f9431d84ec2c5883f38ff20.tar.bz2
podman-728b73d7c4186f4f0f9431d84ec2c5883f38ff20.zip
set pidfile default value int containerconfig
Signed-off-by: chenkang <kongchen28@gmail.com>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index f9b5c5c51..6290479a8 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -366,6 +366,10 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
ctr.config.ConmonPidFile = filepath.Join(ctr.state.RunDir, "conmon.pid")
}
+ if ctr.config.PidFile == "" {
+ ctr.config.PidFile = filepath.Join(ctr.state.RunDir, "pidfile")
+ }
+
// Go through named volumes and add them.
// If they don't exist they will be created using basic options.
// Maintain an array of them - we need to lock them later.