summaryrefslogtreecommitdiff
path: root/pkg/util
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-05-21 22:08:08 +0200
committerGitHub <noreply@github.com>2019-05-21 22:08:08 +0200
commit536fd6adddd9693649457441bd4721c3a774ff0b (patch)
treee4837741f40bc2a6476d6416bfc5566dcd672061 /pkg/util
parent8f43d08d966b9519011cb8ca86e2db9f1f18dfcb (diff)
parent53a76223ee5bded3be3e0ed957517513ad357a0e (diff)
downloadpodman-536fd6adddd9693649457441bd4721c3a774ff0b.tar.gz
podman-536fd6adddd9693649457441bd4721c3a774ff0b.tar.bz2
podman-536fd6adddd9693649457441bd4721c3a774ff0b.zip
Merge pull request #3084 from giuseppe/rootless-pause-process
rootless: use a pause process to keep namespaces alive
Diffstat (limited to 'pkg/util')
-rw-r--r--pkg/util/utils_supported.go10
-rw-r--r--pkg/util/utils_windows.go6
2 files changed, 16 insertions, 0 deletions
diff --git a/pkg/util/utils_supported.go b/pkg/util/utils_supported.go
index 8b98658c2..3d9140a23 100644
--- a/pkg/util/utils_supported.go
+++ b/pkg/util/utils_supported.go
@@ -82,3 +82,13 @@ func GetRootlessRuntimeDir() (string, error) {
}
return rootlessRuntimeDir, nil
}
+
+// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
+// the pause process
+func GetRootlessPauseProcessPidPath() (string, error) {
+ runtimeDir, err := GetRootlessRuntimeDir()
+ if err != nil {
+ return "", err
+ }
+ return filepath.Join(runtimeDir, "libpod", "pause.pid"), nil
+}
diff --git a/pkg/util/utils_windows.go b/pkg/util/utils_windows.go
index b33733da9..3faa6f10c 100644
--- a/pkg/util/utils_windows.go
+++ b/pkg/util/utils_windows.go
@@ -15,3 +15,9 @@ func GetRootlessRuntimeDir() (string, error) {
func IsCgroup2UnifiedMode() (bool, error) {
return false, errors.New("this function is not implemented for windows")
}
+
+// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
+// the pause process
+func GetRootlessPauseProcessPidPath() (string, error) {
+ return "", errors.New("this function is not implemented for windows")
+}