proc

package
v3.0.0-rc43 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tree

func Tree(pid int) []int

Tree is pid and the ids of all its descendants, parents first, from one scan of /proc.

Types

type L

type L struct {
	// contains filtered or unexported fields
}

func All

func All() (L, error)

func ByCmdline

func ByCmdline(c []string) (L, error)

func NewList

func NewList() L

func (*L) Add

func (t *L) Add(proc T)

func (*L) AddPID

func (t *L) AddPID(pid int)

func (*L) FilterByEnv

func (t *L) FilterByEnv(key string, value string) L

func (*L) FilterByEnvList

func (t *L) FilterByEnvList(keys []string, value string) L

func (L) HasPID

func (t L) HasPID(pid int) bool

func (L) Len

func (t L) Len() int

func (L) Procs

func (t L) Procs() []T

func (L) String

func (t L) String() string

type T

type T struct {
	// contains filtered or unexported fields
}

func New

func New(pid int) T

func (T) CommandLine

func (t T) CommandLine() string

func (*T) Env

func (t *T) Env() map[string]string

func (T) Head

func (t T) Head() string

func (T) PID

func (t T) PID() int

func (T) PPID

func (t T) PPID() (int, error)

PPID is the id of the parent process, read from /proc/<pid>/stat.

func (T) Process

func (t T) Process() (*os.Process, error)

func (T) Signal

func (t T) Signal(sig os.Signal) error

func (T) String

func (t T) String() string

Jump to

Keyboard shortcuts

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