go-timeout

module
v1.0.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: GPL-3.0

README

go-timeout

timeout is a Go port of GNU Coreutils timeout.

It starts a command, waits for a duration, and terminates the command if it is still running.

Usage

timeout [OPTION]... DURATION COMMAND [ARG]...

Examples:

timeout 5s sleep 10
timeout --signal=KILL 1s long-running-command
timeout --kill-after=2s 5s command-that-may-ignore-term

Supported options:

  • -f, --foreground
  • -k DURATION, --kill-after=DURATION
  • -p, --preserve-status
  • -s SIGNAL, --signal=SIGNAL
  • -v, --verbose
  • --help
  • --version

Install

Install from source:

go install github.com/KEINOS/go-timeout/cmd/timeout@latest

Or build the local checkout:

make build

The local binary is written to:

dist/timeout

Usage as a Library

The implementation lives in the timeout package and can be used from Go code. See CONTRIBUTING.md for the repository layout and development notes.

Contributing

Issues and bug reports are welcome:

https://github.com/KEINOS/go-timeout/issues

Before sending changes, run:

make check-full

License

GPL-3.0. See LICENSE.txt.

Directories

Path Synopsis
cmd
timeout command
Package main provides the timeout command entry point.
Package main provides the timeout command entry point.
Package timeout implements a GNU-compatible timeout command.
Package timeout implements a GNU-compatible timeout command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL