process

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

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 handles process controls

func (*Process) Interrupt

func (p *Process) Interrupt()

Interrupt sends keyboard interrupt to the process and wait until it stops

func (*Process) Kill

func (p *Process) Kill()

Kill kills the process immediately

func (*Process) Pipes

Pipes returns stdin / stdout / stderr pipes

func (*Process) Start

func (p *Process) Start(name string, arg ...string) error

Start excutes the commmand

type StderrReadCloser

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

StderrReadCloser handles process's Stdout

this reader also exports its outputs to stdout

func NewStderr

func NewStderr(r io.ReadCloser) *StderrReadCloser

NewStderr make stdin read and closer

func (StderrReadCloser) Close

func (s StderrReadCloser) Close() error

Close ...

func (StderrReadCloser) Read

func (s StderrReadCloser) Read(p []byte) (n int, err error)

type StdinWriteCloser

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

StdinWriteCloser wraps io.WriteCloser

start method starts synchronizing process's stdin with stdin

func NewStdin

func NewStdin(w io.WriteCloser) *StdinWriteCloser

NewStdin make stdin write and closer

func (StdinWriteCloser) Close

func (w StdinWriteCloser) Close() error

Close ...

func (StdinWriteCloser) Write

func (w StdinWriteCloser) Write(p []byte) (n int, err error)

type StdoutReadCloser

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

StdoutReadCloser handles process's Stdout

this reader also exports its outputs to stdout

func NewStdout

func NewStdout(r io.ReadCloser) *StdoutReadCloser

NewStdout make stdin read and closer

func (StdoutReadCloser) Close

func (s StdoutReadCloser) Close() error

Close ...

func (StdoutReadCloser) Read

func (s StdoutReadCloser) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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