Skip to content

Commit

Permalink
libpod: run conmon from the persist directory
Browse files Browse the repository at this point in the history
conmon creates a "oom" file inside the current working directory when
an OOM event happens in the cgroup.  Run conmon from the persist
directory so it doesn't leak files in the directory where Podman runs.

Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Jul 10, 2024
1 parent 754ddad commit 0f7550c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libpod/oci_conmon_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -1197,6 +1197,7 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Dir = persistDir
if ctr.Terminal() {
cmd.Stderr = &stderrBuf
}
Expand Down

0 comments on commit 0f7550c

Please sign in to comment.