sys

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const OOMScoreMaxKillable = -999

OOMScoreMaxKillable is the maximum score keeping the process killable by the oom killer

Variables

This section is empty.

Functions

func CreateUnixSocket

func CreateUnixSocket(path string) (net.Listener, error)

CreateUnixSocket creates a unix socket and returns the listener

func ForceRemoveAll

func ForceRemoveAll(path string) error

ForceRemoveAll on unix is just a wrapper for os.RemoveAll

func GetLocalListener

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

GetLocalListener returns a listerner out of a unix socket.

func SetOOMScore

func SetOOMScore(pid, score int) error

SetOOMScore sets the oom score for the provided pid

func StatATimeAsTime

func StatATimeAsTime(st *syscall.Stat_t) time.Time

StatATimeAsTime returns the access time as a time.Time

func StatAtime

func StatAtime(st *syscall.Stat_t) syscall.Timespec

StatAtime returns the access time from a stat struct

func StatCtime

func StatCtime(st *syscall.Stat_t) syscall.Timespec

StatCtime returns the created time from a stat struct

func StatMtime

func StatMtime(st *syscall.Stat_t) syscall.Timespec

StatMtime returns the modified time from a stat struct

Types

type Exit

type Exit struct {
	Pid    int
	Status int
}

Exit is the wait4 information from an exited process

func Reap

func Reap(wait bool) (exits []Exit, err error)

Reap reaps all child processes for the calling process and returns their exit information

Jump to

Keyboard shortcuts

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