View Source
const (
	DefaultExitCodeOnError = 128


This section is empty.


func DoHeadless

func DoHeadless(command []string, env map[string]string) (int, error)

func Lookup

func Lookup(bin string, extraLookupPaths []string) (string, error)

func Prepare

func Prepare(s Spec) (*exec.Cmd, error)

    Prepare an unstarted exec.Cmd


    type Cmd

    type Cmd struct {
    	ExecCmd *exec.Cmd
    	// stdin/stdout set when created with tty enabled
    	TtyInput  io.WriteCloser
    	TtyOutput io.ReadCloser
    	// contains filtered or unexported fields

    func Do

    func Do(s Spec) (*Cmd, error)

      Do execute command directly in host

      func (*Cmd) Release

      func (c *Cmd) Release() error

        Release process if wait was not called and you want to terminate it

        func (*Cmd) Resize

        func (c *Cmd) Resize(cols, rows uint32) error

          Resize tty windows if was created with tty enabled

          func (*Cmd) Wait

          func (c *Cmd) Wait() (int, error)

            Wait until command exited

            type Spec

            type Spec struct {
            	Context context.Context
            	Env         map[string]string
            	Command     []string
            	SysProcAttr *syscall.SysProcAttr
            	ExtraLookupPaths []string
            	// stdin/stdout/stderr streams, not used if tty required
            	Stdin          io.Reader
            	Stdout, Stderr io.Writer
            	Tty bool