sys

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OOMScoreAdjMax is not implemented on Windows
	OOMScoreAdjMax = 0
)
View Source
const (
	// SddlAdministratorsLocalSystem is local administrators plus NT AUTHORITY\System
	SddlAdministratorsLocalSystem = "D:P(A;OICI;GA;;;BA)(A;OICI;GA;;;SY)"
)

Variables

This section is empty.

Functions

func CreateSequential

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

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

func ForceRemoveAll(path string) error

ForceRemoveAll is the same as os.RemoveAll, but uses hcsshim.DestroyLayer in order to delete container layers.

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 IsAbs

func IsAbs(path string) bool

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 IsFifo

func IsFifo(path string) (bool, error)

IsFifo checks if a file is a (named pipe) fifo if the file does not exist then it returns false

func MkdirAll

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

MkdirAll implementation 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, perm os.FileMode) error

MkdirAllWithACL is a wrapper for MkdirAll that creates a directory ACL'd for Builtin Administrators and Local System.

func OpenFileSequential

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

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

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

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 RunningInUserNS

func RunningInUserNS() bool

RunningInUserNS is a stub for non-Linux systems Always returns false

func SetOOMScore

func SetOOMScore(pid, score int) error

SetOOMScore sets the oom score for the process

Not implemented on Windows

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