sys

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 1,219

Documentation

Index

Constants

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

SddlAdministratorsLocalSystem is local administrators plus NT AUTHORITY\System.

Variables

This section is empty.

Functions

func AdjustOOMScore added in v1.5.0

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 deprecated

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 added in v1.3.0

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 deprecated

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 deprecated

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 deprecated added in v1.7.0

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

TempFileSequential is deprecated.

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

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL