Documentation ¶
Index ¶
- Constants
- Variables
- func CombinedOutputTimeout(c *exec.Cmd, timeout time.Duration) ([]byte, error)
- func RunTimeout(c *exec.Cmd, timeout time.Duration) error
- func StdOutputTimeout(c *exec.Cmd, timeout time.Duration) ([]byte, error)
- func WaitTimeout(c *exec.Cmd, timeout time.Duration) error
- type Duration
Constants ¶
View Source
const KillGrace = 5 * time.Second
KillGrace is the amount of time we allow a process to shutdown before sending a SIGKILL.
Variables ¶
View Source
var ( ErrTimeout = errors.New("command timed out") ErrNotImplemented = errors.New("not implemented yet") )
Functions ¶
func CombinedOutputTimeout ¶ added in v1.300034.0
CombinedOutputTimeout runs the given command with the given timeout and returns the combined output of stdout and stderr. If the command times out, it attempts to kill the process.
func RunTimeout ¶ added in v1.300034.0
RunTimeout runs the given command with the given timeout. If the command times out, it attempts to kill the process.
func StdOutputTimeout ¶ added in v1.300034.0
StdOutputTimeout runs the given command with the given timeout and returns the output of stdout. If the command times out, it attempts to kill the process.
Types ¶
Click to show internal directories.
Click to hide internal directories.