Hi,
> Example for a hard limit on the CPU time:
>
> $ ulimit -t 7
> $ time -p yes > /dev/null
> Killed
> real 6.72
> user 6.93
> sys 0.06
This would be better:
$ ulimit -St 7
$ ulimit -Ht 8
$ time -p yes > /dev/null
CPU time limit exceeded
real 6.70
user 6.93
sys 0.06
That is, allow the process to catch SIGXCPU and exit gracefully,
but apply a hard cut a bit later, when necessary...
|