carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1//go:build !linux
2
3package cgroup
4
5import (
6 "errors"
7 "os/exec"
8)
9
10// The placement shim needs cgroup v2, so it is linux only.
11
12// shimAvailable is true here only while FakePlacementForTest stands in for
13// the shim, which it never runs.
14func shimAvailable() bool { return shimForcedForTest.Load() }
15
16func runShim([]string) int { return 127 }
17
18func runProbe() int { return 127 }
19
20func (m *Manager) startViaShim(dir string, cmd *exec.Cmd, before func() error) (refused bool, err error) {
21 return false, &placementError{errors.New("placement before exec needs linux")}
22}
23