Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/songmu/timeout

Timeout invocation. Go porting of GNU timeout and able to use as Go package
https://github.com/songmu/timeout

Last synced: 11 days ago
JSON representation

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

Awesome Lists containing this project

README

        

timeout
=======

[![Build Status](https://travis-ci.org/Songmu/timeout.png?branch=master)][travis]
[![Coverage Status](https://coveralls.io/repos/Songmu/timeout/badge.png?branch=master)][coveralls]
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)][license]
[![GoDoc](https://godoc.org/github.com/Songmu/timeout?status.svg)][godoc]

[travis]: https://travis-ci.org/Songmu/timeout
[coveralls]: https://coveralls.io/r/Songmu/timeout?branch=master
[license]: https://github.com/Songmu/timeout/blob/master/LICENSE
[godoc]: https://godoc.org/github.com/Songmu/timeout

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](https://github.com/Songmu)