Skip to content

Commit

Permalink
Merge pull request containers#10288 from Luap99/fix-10274
Browse files Browse the repository at this point in the history
fix container startup for empty pidfile
  • Loading branch information
openshift-merge-robot authored May 10, 2021
2 parents 195895e + 157459a commit 5a8b3cf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libpod/oci_conmon_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,12 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
}
}

args := r.sharedConmonArgs(ctr, ctr.ID(), ctr.bundlePath(), ctr.config.PidFile, ctr.LogPath(), r.exitsDir, ociLog, ctr.LogDriver(), logTag)
pidfile := ctr.config.PidFile
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 {
args = append(args, "-t")
Expand Down

0 comments on commit 5a8b3cf

Please sign in to comment.