Skip to content

Commit

Permalink
Merge pull request containers#22608 from giuseppe/use-pause-process-d…
Browse files Browse the repository at this point in the history
…ir-for-root

util: specify a not empty pause dir for root too
  • Loading branch information
openshift-merge-bot[bot] authored May 6, 2024
2 parents efcb1f8 + 419efb9 commit 07d8b32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/util/utils_supported.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func GetRootlessConfigHomeDir() (string, error) {
// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
// the pause process.
func GetRootlessPauseProcessPidPath() (string, error) {
runtimeDir, err := GetRootlessRuntimeDir()
runtimeDir, err := homedir.GetRuntimeDir()
if err != nil {
return "", err
}
Expand Down
6 changes: 6 additions & 0 deletions pkg/util/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -764,3 +764,9 @@ func TestProcessOptions(t *testing.T) {
})
}
}

func TestGetRootlessPauseProcessPidPath(t *testing.T) {
dir, err := GetRootlessPauseProcessPidPath()
assert.NoError(t, err)
assert.NotEqual(t, dir, "libpod/tmp/pause.pid")
}

0 comments on commit 07d8b32

Please sign in to comment.