Aaron Isotton

Name

limit — Runs a process and kills it after the specified time

Synopsis

limit [ -hvV ] [ -s SIGNAL ] [ -t SECONDS ] {COMMAND} [COMMAND-PARAMETER...]

Description

limit runs the specified command and sends it a signal after the specified time (default: SIGTERM).

It is useful to limit the amount of time a certain program runs.

Options

-h, --help

Display some help and exit.

-s, --signal=SIGNAL

The numerical value of the signal to send to the child when the timeout has expired. The default is 15 (SIGTERM). There is a list of supported signals on your system in signals(7).

Using signal names (such as SIGTERM, SIGKILL etc.) is currently unsupported.

-t, --time=SECONDS

Send the specified signal after SECONDS seconds. If you do not specify this option, the program is never killed.

-V, --version

Display version information and exit.

Examples

Run find on the root directory for three seconds:

limit -t 3 /usr/bin/find /

Author

limit is copyright (C) 2006 Aaron Isotton . You may use it under the terms of the GNU General Public License.

Source code and newer versions are available from http://www.isotton.com/utils/limit/.

Report bugs to with “[limit]” as the first word of the subject.

See Also

signals(7), kill(1), nohup(1)