/timeout

Timeout invocation. Go porting of GNU timeout and able to use as Go package

Primary LanguageGoMIT LicenseMIT

timeout

Build Status Coverage Status MIT License GoDoc

Timeout invocation. Go porting of GNU timeout

Description

Run a given command with a time limit.

Synopsis

tio := &timeout.Timeout{
	Cmd:            exec.Command("perl", "-E", "say 'Hello'"),
	Duration:       10 * time.Second,
	KillAfter:      5 * time.Second,
}
exitStatus, stdout, stderr, err := tio.Run()

Author

Songmu