process

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2015 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cat

func Cat(path string) string

Replicates how the command line tool `cat` works, but is more verbose about what it does

func PrepareCommandProcess

func PrepareCommandProcess(p *Process)

func Run

func Run(command string, arg ...string) (string, error)

func StartPTY

func StartPTY(c *exec.Cmd) (*os.File, error)

Types

type Process

type Process struct {
	Pid        int
	Running    bool
	PTY        bool
	Script     string
	Env        []string
	ExitStatus string

	StartCallback func()
	LineCallback  func(string)
	// contains filtered or unexported fields
}

func (Process) Create

func (p Process) Create() *Process

func (*Process) Kill

func (p *Process) Kill() error

func (*Process) Output

func (p *Process) Output() string

func (*Process) Start

func (p *Process) Start() error

Jump to

Keyboard shortcuts

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