Skip to content

Timeoutput stops a command when it does not create output for a specified time or takes longer to run then some other time.

License

Notifications You must be signed in to change notification settings

damoon/timeoutput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timeoutput

Limits the execution time of a command.

Go Report Card

Usage

timeoutput <global timeout> <output timeout> <command>...

The maximum execution time is limited by the first parameter.
The maximum time between outputs to stderr or stdout is limited by the second parameter.
All following arguments are interpreted as the command to execute.

The exit code is none zero for timeouts and forwards the exit code from the executed command otherwise.

Example

command

./timeoutput 10 2 bash -c "while sleep 1; do echo hello; done"

output

hello
hello
hello
hello
hello
hello
hello
hello
hello

Installation

go get github.com/damoon/timeoutput

About

Timeoutput stops a command when it does not create output for a specified time or takes longer to run then some other time.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages