process

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package process contains a wrapper around a running bwrap instance, and is in a separate package just to break an import loop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

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

Process is a running bwrap instance.

func NewProcess

func NewProcess(cmd *exec.Cmd) *Process

NewProcess creates a new Process instance from a Cmd.

func (*Process) AddTermHook

func (p *Process) AddTermHook(fn func())

AddTermHook adds the hook function fn to be called on process exit.

func (*Process) Kill

func (p *Process) Kill()

Kill terminates the bwrap instance and all of it's children.

func (*Process) Running

func (p *Process) Running() bool

Running returns true if the bwrap instance is running.

func (*Process) SetInitPid

func (p *Process) SetInitPid(pid int)

SetInitPid sets the pid of the bwrap init fork. This should not be called except from the sandbox creation routine.

func (*Process) Wait

func (p *Process) Wait() error

Wait waits for the bwrap instance to complete.

Jump to

Keyboard shortcuts

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