Help us shape the future of Go! Take the 2026 Go Developer Survey

timeout

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package timeout implements the `timeout` built-in.

Usage:

timeout [OPTIONS] DURATION COMMAND [ARG]...

Options:

-s, --signal=SIG       signal to send on timeout (recorded but
                       not delivered — no real signals)
-k, --kill-after=DUR   send KILL after DUR if process is still
                       running (also a no-op)
--preserve-status      return COMMAND's status even on timeout
--help                 show this help and exit

On timeout, exits 124 (matching GNU timeout). The COMMAND is dispatched via Context.Exec so it runs through the same runtime pipeline (limits, registry, stdio) as the caller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() command.Command

New returns the timeout command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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