aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/utils.go2
-rw-r--r--utils/utils_freebsd.go22
2 files changed, 23 insertions, 1 deletions
diff --git a/utils/utils.go b/utils/utils.go
index aa1c6a958..4d41ce5f8 100644
--- a/utils/utils.go
+++ b/utils/utils.go
@@ -128,7 +128,7 @@ func moveProcessPIDFileToScope(pidPath, slice, scope string) error {
if os.IsNotExist(err) {
return nil
}
- return fmt.Errorf("cannot read pid file %s: %w", pidPath, err)
+ return fmt.Errorf("cannot read pid file: %w", err)
}
pid, err := strconv.ParseUint(string(data), 10, 0)
if err != nil {
diff --git a/utils/utils_freebsd.go b/utils/utils_freebsd.go
new file mode 100644
index 000000000..d239e9a5d
--- /dev/null
+++ b/utils/utils_freebsd.go
@@ -0,0 +1,22 @@
+//go:build freebsd
+// +build freebsd
+
+package utils
+
+import "errors"
+
+func RunUnderSystemdScope(pid int, slice string, unitName string) error {
+ return errors.New("not implemented for freebsd")
+}
+
+func MoveUnderCgroupSubtree(subtree string) error {
+ return errors.New("not implemented for freebsd")
+}
+
+func GetOwnCgroup() (string, error) {
+ return "", errors.New("not implemented for freebsd")
+}
+
+func GetCgroupProcess(pid int) (string, error) {
+ return "", errors.New("not implemented for freebsd")
+}