process

package
v0.0.0-...-f5de9ae Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump() interface{}

func Init

func Init(switchedContext func(PID, PID))

Types

type PID

type PID = common.PID

type ProcAttr

type ProcAttr struct {
	Dir   string
	Env   map[string]string
	Files []fs.Attr
}

ProcAttr is functionally identical to os.ProcAttr. Env is structured as a map (instead of key=value pairs), and files is purely a list of nil-able file descriptor IDs. nil FIDs are to be effectively closed to the new process.

type Process

type Process interface {
	PID() PID
	ParentPID() PID

	Start() error
	Wait() (exitCode int, err error)
	Files() *fs.FileDescriptors
	WorkingDirectory() string
	SetWorkingDirectory(wd string) error
}

func Current

func Current() Process

func Get

func Get(pid PID) (process Process, ok bool)

func New

func New(command string, args []string, attr *ProcAttr) (Process, error)

Jump to

Keyboard shortcuts

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