package sys
import "github.com/containerd/containerd/sys"
Index ¶
- Constants
- Variables
- func AdjustOOMScore(pid, score int) error
- func CreateSequential(name string) (*os.File, error)
- func ForceRemoveAll(path string) error
- func GetLocalListener(path string, uid, gid int) (net.Listener, error)
- func GetOOMScoreAdj(pid int) (int, error)
- func IsAbs(path string) bool
- func MkdirAll(path string, _ os.FileMode) error
- func MkdirAllWithACL(path string, perm os.FileMode) error
- func OpenFileSequential(name string, flag int, _ os.FileMode) (*os.File, error)
- func OpenSequential(name string) (*os.File, error)
- func SetOOMScore(pid, score int) error
Constants ¶
const ( // OOMScoreMaxKillable is not implemented on non Linux OOMScoreMaxKillable = 0 // OOMScoreAdjMax is not implemented on non Linux OOMScoreAdjMax = 0 )
const ( // SddlAdministratorsLocalSystem is local administrators plus NT AUTHORITY\System SddlAdministratorsLocalSystem = "D:P(A;OICI;GA;;;BA)(A;OICI;GA;;;SY)" )
Variables ¶
var RunningInUserNS = userns.RunningInUserNS
RunningInUserNS detects whether we are currently running in a user namespace. Deprecated: use github.com/containerd/containerd/pkg/userns.RunningInUserNS instead.
Functions ¶
func AdjustOOMScore ¶
AdjustOOMScore sets the oom score for the provided pid. If the provided score is out of range (-1000 - 1000), it is clipped to the min/max value.
Not implemented on Windows
func CreateSequential ¶
CreateSequential creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR. If there is an error, it will be of type *PathError.
func ForceRemoveAll ¶
ForceRemoveAll is the same as os.RemoveAll, but is aware of io.containerd.snapshotter.v1.windows and uses hcsshim to unmount and delete container layers contained therein, in the correct order, when passed a containerd root data directory (i.e. the `--root` directory for containerd).
func GetLocalListener ¶
GetLocalListener returns a Listernet out of a named pipe. `path` must be of the form of `\\.\pipe\<pipename>` (see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365150)
func GetOOMScoreAdj ¶
GetOOMScoreAdj gets the oom score for a process
Not implemented on Windows
func IsAbs ¶
IsAbs is a platform-specific wrapper for filepath.IsAbs. On Windows, golang filepath.IsAbs does not consider a path \windows\system32 as absolute as it doesn't start with a drive-letter/colon combination. However, in docker we need to verify things such as WORKDIR /windows/system32 in a Dockerfile (which gets translated to \windows\system32 when being processed by the daemon. This SHOULD be treated as absolute from a docker processing perspective.
func MkdirAll ¶
MkdirAll implementation that is volume path aware for Windows. It can be used as a drop-in replacement for os.MkdirAll()
func MkdirAllWithACL ¶
MkdirAllWithACL is a wrapper for MkdirAll that creates a directory ACL'd for Builtin Administrators and Local System.
func OpenFileSequential ¶
OpenFileSequential is the generalized open call; most users will use Open or Create instead. If there is an error, it will be of type *PathError.
func OpenSequential ¶
OpenSequential opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY. If there is an error, it will be of type *PathError.
func SetOOMScore ¶
SetOOMScore sets the oom score for the process
Not implemented on Windows
Source Files ¶
filesys_windows.go oom_unsupported.go socket_windows.go userns_deprecated.go
- Version
- v1.6.32
- Published
- May 22, 2024
- Platform
- windows/amd64
- Imports
- 14 packages
- Last checked
- 3 seconds ago –
Tools for package owners.