s6-portable-utils
Software
skarnet.org
The s6-maximumtime program
s6-maximumtime executes a program with a time limit.
Interface
s6-maximumtime [ -0 | -a | -b | -i | -k | -q | -t | -x | -1 | -2 ] milli prog...
- s6-maximumtime forks and execs prog... as a child.
- If milli milliseconds elapse before prog exits,
s6-maximumtime sends it a signal and exits 99 with a message.
- Else s6-maximumtime exits with the same exit code as prog.
Options
- -0 : on timeout, do not send any signal, just exit
- -a : on timeout, send a SIGALRM
- -b : on timeout, send a SIGABRT
- -i : on timeout, send a SIGINT
- -k : on timeout, send a SIGKILL
- -q : on timeout, send a SIGQUIT
- -t : on timeout, send a SIGTERM - this is the default
- -x : on timeout, send a SIGXCPU
- -1 : on timeout, send a SIGUSR1
- -2 : on timeout, send a SIGUSR2
Notes
- If milli is 0, then it's interpreted as infinite: no time
limit will be enforced.