mirror of
https://github.com/containers/podman.git
synced 2025-11-13 09:38:05 +08:00
set pidfile default value int containerconfig
Signed-off-by: chenkang <kongchen28@gmail.com>
This commit is contained in:
@@ -1025,12 +1025,7 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pidfile := ctr.config.PidFile
|
args := r.sharedConmonArgs(ctr, ctr.ID(), ctr.bundlePath(), ctr.config.PidFile, ctr.LogPath(), r.exitsDir, ociLog, ctr.LogDriver(), logTag)
|
||||||
if pidfile == "" {
|
|
||||||
pidfile = filepath.Join(ctr.state.RunDir, "pidfile")
|
|
||||||
}
|
|
||||||
|
|
||||||
args := r.sharedConmonArgs(ctr, ctr.ID(), ctr.bundlePath(), pidfile, ctr.LogPath(), r.exitsDir, ociLog, ctr.LogDriver(), logTag)
|
|
||||||
|
|
||||||
if ctr.config.Spec.Process.Terminal {
|
if ctr.config.Spec.Process.Terminal {
|
||||||
args = append(args, "-t")
|
args = append(args, "-t")
|
||||||
|
|||||||
@@ -366,6 +366,10 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
|
|||||||
ctr.config.ConmonPidFile = filepath.Join(ctr.state.RunDir, "conmon.pid")
|
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.
|
// Go through named volumes and add them.
|
||||||
// If they don't exist they will be created using basic options.
|
// If they don't exist they will be created using basic options.
|
||||||
// Maintain an array of them - we need to lock them later.
|
// Maintain an array of them - we need to lock them later.
|
||||||
|
|||||||
Reference in New Issue
Block a user