exec

package
v0.0.0-...-8749f2e Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWaitPIDTimeout = fmt.Errorf("Timed out waiting for PID to complete")

Functions

func RunCommand

func RunCommand(name string, arg ...string) (string, error)

func RunCommandExt

func RunCommandExt(cmd *exec.Cmd) (string, error)

RunCommandExt is a convenience function to run/log a command and return/log stderr in an error upon failure. Chops off a trailing newline (if present)

func WaitPID

func WaitPID(pid int, opts ...WaitPIDOpts) error

WaitPID waits for a non-child process id to exit

Types

type WaitPIDOpts

type WaitPIDOpts struct {
	PollInterval time.Duration
	Timeout      time.Duration
}

WaitPIDOpts are options to WaitPID

Jump to

Keyboard shortcuts

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