Hi,

> From: Clemens Hintze
> Sent: Monday, January 08, 2001 11:20 PM

>   sandbox.execute("p %x(ls -l /)")
>   sandbox.execute("exec 'ls -l /'")
>   sandbox.execute("Thread.new { sleep 60000 } while 1")
>   sandbox.execute("def endless; t = Object.clone; endless end; endless")

Though I did not follow this thread(sorry), why don't
you use $SAFE, ThreadGroup and Thread#priority?

1. Create new aThreadGroup
2. Create new aThread for sandbox
3. Set appropriate $SAFE level to aThread
4. Set low priority to aThread
5. Add aThread to aThreadGroup
6. Eval code in aThread
7. Kill threads in aThreadGroup.list when timeout

See also ARb by Seki-san in
http://www2a.biglobe.ne.jp/~seki/ruby/arb-0.4.tar.gz

I'm sorry if it is out of topic.

// NaHi