timeout

command
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Command timeout runs a command, stopping it after a duration.

Usage: timeout [-s signal] [-g grace] <duration> <command> [args...]

Timeout runs <command> with [args...] signalling it with <signal> (default SIGTERM) after the given <duration>. If the process has not exited by the time the <grace> period passes (default 3s), the process is killed.

The exit code of timeout is <command>'s exit code if it exited on its own. If the command could not be run or the timeout expires, the exit code of timeout is 1.

<duration> and <grace> are parsed as time.Duration strings (see https://golang.org/pkg/time/#ParseDuration).

<command> is executed directly with [args...] as provided. If <command> does not contain any path separators, the search path is used to locate it. No shell is used to run <command>.

Jump to

Keyboard shortcuts

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