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 GetOpenFds(pid int) (int, error)
- func MkdirAllWithACL(path string, perm os.FileMode) error
- func RunningPrivileged() bool
- func RunningUnprivileged() bool
- func SetOOMScore(pid, score int) error
- type Exit
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 GetOpenFds ¶
GetOpenFds returns the number of open fds for the process provided by pid
func MkdirAllWithACL ¶
MkdirAllWithACL is a wrapper for os.MkdirAll on Unix systems.
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
Types ¶
type Exit ¶
Exit is the wait4 information from an exited process
func Reap ¶
Reap reaps all child processes for the calling process and returns their exit information
Source Files ¶
env.go fds.go filesys_unix.go oom_unix.go reaper.go socket_unix.go
Directories ¶
Path | Synopsis |
---|---|
sys/reaper |
- Version
- v1.3.1
- Published
- Nov 20, 2019
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- 1 hour ago –
Tools for package owners.