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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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