system

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearKeepCaps

func ClearKeepCaps() error

func Exec

func Exec(cmd string, args []string, env []string) error

func SetKeepCaps

func SetKeepCaps() error

func SetParentDeathSignal

func SetParentDeathSignal(sig uintptr) error

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
}

func Stat

func Stat(pid int) (stat Stat_t, err error)

Stat返回具体进程的一个Stat_t实例

type State

type State rune
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

func (s State) String() string

Jump to

Keyboard shortcuts

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