package sys
import "github.com/containerd/containerd/sys"
Index ¶
- Constants
- func CreateUnixSocket(path string) (net.Listener, error)
- func ForceRemoveAll(path string) error
- func GetLocalListener(path string, uid, gid int) (net.Listener, error)
- func GetOOMScoreAdj(pid int) (int, error)
- func IsFifo(path string) (bool, error)
- func MkdirAllWithACL(path string, perm os.FileMode) error
- func RunningInUserNS() bool
- func RunningPrivileged() bool
- func RunningUnprivileged() bool
- func SetOOMScore(pid, score int) error
- func StatATimeAsTime(st *syscall.Stat_t) time.Time
- func StatAtime(st *syscall.Stat_t) syscall.Timespec
- func StatCtime(st *syscall.Stat_t) syscall.Timespec
- func StatMtime(st *syscall.Stat_t) syscall.Timespec
Constants ¶
const OOMScoreMaxKillable = -999
OOMScoreMaxKillable is the maximum score keeping the process killable by the oom killer
Functions ¶
func CreateUnixSocket ¶
CreateUnixSocket creates a unix socket and returns the listener
func ForceRemoveAll ¶
ForceRemoveAll on unix is just a wrapper for os.RemoveAll
func GetLocalListener ¶
GetLocalListener returns a listener out of a unix socket.
func GetOOMScoreAdj ¶
GetOOMScoreAdj gets the oom score for a process
func IsFifo ¶
IsFifo checks if a file is a (named pipe) fifo if the file does not exist then it returns false
func MkdirAllWithACL ¶
MkdirAllWithACL is a wrapper for os.MkdirAll on Unix systems.
func RunningInUserNS ¶
func RunningInUserNS() bool
RunningInUserNS is a stub for non-Linux systems Always returns false
func RunningPrivileged ¶
func RunningPrivileged() bool
RunningPrivileged returns true if the effective user ID of the calling process is 0
func RunningUnprivileged ¶
func RunningUnprivileged() bool
RunningUnprivileged returns true if the effective user ID of the calling process is not 0
func SetOOMScore ¶
SetOOMScore sets the oom score for the provided pid
func StatATimeAsTime ¶
StatATimeAsTime returns the access time as a time.Time
func StatAtime ¶
StatAtime returns the access time from a stat struct
func StatCtime ¶
StatCtime returns the created time from a stat struct
func StatMtime ¶
StatMtime returns the modified time from a stat struct
Source Files ¶
env.go filesys.go filesys_unix.go oom_unix.go socket_unix.go stat_bsd.go userns_unsupported.go
Directories ¶
Path | Synopsis |
---|---|
sys/reaper |
- Version
- v1.4.0-beta.2
- Published
- Jul 13, 2020
- Platform
- darwin/amd64
- Imports
- 11 packages
- Last checked
- 1 minute ago –
Tools for package owners.