ps

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const BUfSize = 1024 * 1024

Variables

This section is empty.

Functions

func Execute

func Execute(command string, argslice []string, wd *string, iofunc func(io.WriteCloser, io.ReadCloser, io.ReadCloser)) (*os.ProcessState, error)

func MakeReadByteArrayChannel

func MakeReadByteArrayChannel(reader io.ReadCloser) chan []byte

func MakeReadStringChannel

func MakeReadStringChannel(reader io.ReadCloser) chan string

Types

type Process

type Process struct {
	CmdLine string
	// contains filtered or unexported fields
}

UnixProcess is an implementation of Process that contains Unix-specific fields and information.

func FindProcess

func FindProcess(pid int) (*Process, error)

func NewUnixProcess

func NewUnixProcess(pid int) (*Process, error)

func Processes

func Processes(fn func(*Process) bool) ([]*Process, error)

func (*Process) Cmdline

func (p *Process) Cmdline() string

func (*Process) Executable

func (p *Process) Executable() string

func (*Process) PPid

func (p *Process) PPid() int

func (*Process) Path

func (p *Process) Path() (string, error)

Path returns path to process executable

func (*Process) Pid

func (p *Process) Pid() int

func (*Process) Refresh

func (p *Process) Refresh() error

Refresh reloads all the data associated with this process.

Jump to

Keyboard shortcuts

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