process

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Include

func Include() script.Option

Include the process library in a script environment.

func Kill

func Kill(proc Process) error

Kill a process (using SIGKILL).

@callable: process.Kill @param: proc @Process @retval: err @Error

@usage: err = process.Kill(proc)

func Library

func Library() script.Library

Library prepares a new process library for use within a script environment.

func Name

func Name(proc Process) string

Name gets the name of the passed process.

@callable: process.Name @param: proc @Process @retval: name @String @retval: err @Error

@usage: proc_name = process.Name(proc)

Types

type Process

type Process struct {
	Pid int32

	PPid    int32
	Name    string
	User    string
	Status  string
	CmdLine string
	Exe     string
	TTY     string
}

Process provides a concurrency-safe wrapper for a Process that implements a starlark.Value.

func ParseParam

func ParseParam(parser script.ArgParser, index int) (Process, error)

ParseParam from starlark input

func (Process) Freeze

func (p Process) Freeze()

Freeze is a no-op since the underlying process is safe for concurrent use.

func (Process) Hash

func (p Process) Hash() (uint32, error)

Hash will error since the process type is not intended to be hashable.

func (Process) String

func (p Process) String() string

String returns process metadata.

func (Process) Truth

func (p Process) Truth() starlark.Bool

Truth value of a process is True if the PID is non-negative

func (Process) Type

func (p Process) Type() string

Type returns 'process' to indicate the type of the process within starlark.

Jump to

Keyboard shortcuts

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