shellproc

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShellProc

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

there must just be one ShellProc at a time

func New

func New(stdout, stderr io.Writer, verbose bool) *ShellProc

func (*ShellProc) Kill

func (s *ShellProc) Kill() error

since Kill, Terminate and Run are guaranteed (by observe) to never be called at the same time we don't have to care about concurrency here

func (*ShellProc) Kill2

func (s *ShellProc) Kill2() error

func (*ShellProc) Run

func (s *ShellProc) Run(command string, block bool)

run is blocking block blocks until command has finished

func (*ShellProc) Terminate

func (s *ShellProc) Terminate(timeout time.Duration) error

tries to terminate process and kills it after timeout and if it does not exit properly

Jump to

Keyboard shortcuts

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