timeout

Run command line as a child process (POSIX, toybox)

Syntax:

timeout [-iv] [-k duration] [-s signal] duration command...

Runs on:

QNX OS

Options:

--foreground
Don't create new process group.
-i
Only kill for inactivity (restart timeout when command produces output).
-k duration
Send KILL signal if child process is still running after the first signal for the specified duration.

The duration can be a decimal fraction, with one of the following optional suffixes:

  • d — days
  • h — hours
  • m — minutes
  • s — seconds (default)
--preserve-status
Exit with the child's exit status.
-s signal
Send the specified signal (default TERM).
-v
Be verbose.

Description:

The timeout utility runs a command line as a child process, which sends the child a signal if the command doesn't exit soon enough.

This utility is provided as part of the toybox package. For information on how to enable it, see toybox.

Contributing author:

Rob Landley and the toybox project (see https://landley.net/toybox/).

Page updated: