Skip to content
/ timeout Public

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

License

Notifications You must be signed in to change notification settings

Songmu/timeout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Apr 21, 2019
9710262 · Apr 21, 2019
Mar 25, 2017
Feb 9, 2018
Jan 7, 2018
Jan 7, 2018
Apr 21, 2019
Apr 21, 2019
Mar 15, 2015
Apr 21, 2019
Jan 7, 2018
Apr 21, 2019
Feb 7, 2018
Apr 21, 2019
Apr 21, 2019
Feb 28, 2018
Mar 4, 2018
Jan 7, 2018
Feb 9, 2018
Mar 25, 2017
Apr 21, 2019

Repository files navigation

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