On Mon, Feb 13, 2006 at 10:18:07PM +0200, Alex Efros wrote: > On Mon, Feb 13, 2006 at 06:30:54PM +0200, Alex Efros wrote: > > Is there exists some standard utility to run other process with timeout? > > ulimit isn't suitable because it can only limit used CPU time, while I'm > > speaking about real time. > > I've just discovered `tryto`. Sadly, but looks like there some race > condition bug in it when tryto used to run some process which exit > very quickly. I've tried to run `tryto chpst -l`, noticed strange > results and moved to more simple examples like `tryto true` (see > details below). > powerman@home ~/tmp $ for i in $(seq 1 10); do echo "i=$i"; tryto -v -t 2 bash -c 'true'; done > i=1 > tryto: warning: child "bash" timed out. sending TERM... > tryto: warning: child "bash" not terminated. sending KILL... > tryto: fatal: child timed out, giving up. Yes, it's a race, the patch below should help. Thanks, Gerrit.