package system
import "github.com/opencontainers/runc/libcontainer/system"
Index ¶
- func ClearKeepCaps() error
- func ClearRlimitNofileCache(lim *syscall.Rlimit)
- func Copy(dst io.Writer, src io.Reader) (copied int64, err error)
- func Exec(cmd string, args []string, env []string) error
- func ExecutableMemfd(comment string, flags int) (*os.File, error)
- func GetSubreaper() (int, error)
- func SetKeepCaps() error
- func SetLinuxPersonality(personality int) error
- func SetParentDeathSignal(sig uintptr) error
- func SetSubreaper(i int) error
- func Setctty() error
- type ParentDeathSignal
- func GetParentDeathSignal() (ParentDeathSignal, error)
- func (p ParentDeathSignal) Restore() error
- func (p ParentDeathSignal) Set() error
- type Stat_t
- type State
Functions ¶
func ClearKeepCaps ¶
func ClearKeepCaps() error
func ClearRlimitNofileCache ¶
ClearRlimitNofileCache clears go runtime's nofile rlimit cache. The argument is process RLIMIT_NOFILE values. Relies on go.dev/cl/588076.
func Copy ¶
Copy is like io.Copy except it uses sendfile(2) if the source and sink are both (*os.File) as an optimisation to make copies faster.
func Exec ¶
func ExecutableMemfd ¶
func GetSubreaper ¶
GetSubreaper returns the subreaper setting for the calling process
func SetKeepCaps ¶
func SetKeepCaps() error
func SetLinuxPersonality ¶
SetLinuxPersonality sets the Linux execution personality. For more information see the personality syscall documentation. checkout getLinuxPersonalityFromStr() from libcontainer/specconv/spec_linux.go for type conversion.
func SetParentDeathSignal ¶
func SetSubreaper ¶
SetSubreaper sets the value i as the subreaper setting for the calling process
func Setctty ¶
func Setctty() error
Types ¶
type ParentDeathSignal ¶
type ParentDeathSignal int
func GetParentDeathSignal ¶
func GetParentDeathSignal() (ParentDeathSignal, error)
func (ParentDeathSignal) Restore ¶
func (p ParentDeathSignal) Restore() error
func (ParentDeathSignal) Set ¶
func (p ParentDeathSignal) Set() error
type Stat_t ¶
type Stat_t struct { // Name is the command run by the process. Name string // State is the state of the process. State State // StartTime is the number of clock ticks after system boot (since // Linux 2.6). StartTime uint64 }
Stat_t represents the information from /proc/[pid]/stat, as described in proc(5) with names based on the /proc/[pid]/status fields.
func Stat ¶
Stat returns a Stat_t instance for the specified process.
type State ¶
type State rune
State is the status of a process.
const ( Dead State = 'X' DiskSleep State = 'D' Running State = 'R' Sleeping State = 'S' Stopped State = 'T' TracingStop State = 't' Zombie State = 'Z' Parked State = 'P' Idle State = 'I' )
func (State) String ¶
String forms of the state from proc(5)'s documentation for /proc/[pid]/status' "State" field.
Source Files ¶
linux.go proc.go rlimit_linux.go
Directories ¶
Path | Synopsis |
---|---|
libcontainer/system/kernelversion |
- Version
- v1.2.6 (latest)
- Published
- Mar 14, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 1 hour ago –
Tools for package owners.