package sys

import "github.com/containerd/containerd/sys"

Index

Constants

const (
	// OOMScoreMaxKillable is not implemented on non Linux
	OOMScoreMaxKillable = 0
	// OOMScoreAdjMax is not implemented on non Linux
	OOMScoreAdjMax = 0
)
const SddlAdministratorsLocalSystem = "D:P(A;OICI;GA;;;BA)(A;OICI;GA;;;SY)"

SddlAdministratorsLocalSystem is local administrators plus NT AUTHORITY\System.

Functions

func AdjustOOMScore

func AdjustOOMScore(pid, score int) error

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

func CreateSequential(name string) (*os.File, error)

CreateSequential is deprecated.

Deprecated: use github.com/moby/sys/sequential.Create

func GetLocalListener

func GetLocalListener(path string, uid, gid int) (net.Listener, error)

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

func GetOOMScoreAdj(pid int) (int, error)

GetOOMScoreAdj gets the oom score for a process

Not implemented on Windows

func MkdirAll

func MkdirAll(path string, _ os.FileMode) error

MkdirAll is a custom version of os.MkdirAll that is volume path aware for Windows. It can be used as a drop-in replacement for os.MkdirAll.

func MkdirAllWithACL

func MkdirAllWithACL(path string, _ os.FileMode) error

MkdirAllWithACL is a custom version of os.MkdirAll modified for use on Windows so that it is both volume path aware, and to create a directory an appropriate SDDL defined ACL for Builtin Administrators and Local System.

func OpenFileSequential

func OpenFileSequential(name string, flag int, perm os.FileMode) (*os.File, error)

OpenFileSequential is deprecated.

Deprecated: use github.com/moby/sys/sequential.OpenFile

func OpenSequential

func OpenSequential(name string) (*os.File, error)

OpenSequential is deprecated.

Deprecated: use github.com/moby/sys/sequential.Open

func SetOOMScore

func SetOOMScore(pid, score int) error

SetOOMScore sets the oom score for the process

Not implemented on Windows

func TempFileSequential

func TempFileSequential(dir, prefix string) (f *os.File, err error)

TempFileSequential is deprecated.

Deprecated: use github.com/moby/sys/sequential.CreateTemp

Source Files

filesys_deprecated_windows.go filesys_windows.go oom_unsupported.go socket_windows.go

Version
v1.7.3
Published
Jul 27, 2023
Platform
windows/amd64
Imports
8 packages
Last checked
50 seconds ago

Tools for package owners.