--8752jWCXWgM6WtY1Xho
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Wed, 2006-08-16 at 00:35 +0900, why the lucky stiff wrote:
> I'm specifically stumped concerning #1, looking for ideas of any substance.
> Thankyou, able minds everywhere.

> > 1. Ruby uses setitimer to switch threads.  I would like to use setitimer as well
> > to abort a sandbox which runs longer than its timeout.  Can anyone recommend a
> > signal which can be used for this?  Or could I get access to the thread
> > switching routine so I can check sandbox timeouts between threads?  Or,erhaps
> > there is another strategy.

Well ... whether it uses setitimer depends on the build configuration,
doesn't it?  I think you've either got to hook the thread context
switch, or appoint a watchdog thread for each sandbox (which sleeps for
the timeout and wakes to kill the sandbox if it hasn't finished).  

Having a watchdog thread should require the least hackery -- maybe the
only question at that point is whether it's easy for a separate thread
to cleanly kill a rogue sandbox the way you want it to?

-mental

--8752jWCXWgM6WtY1Xho
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBE4gZASuZBmZzm14ERAkHYAKC/ZcBNDuiNXeKDqk8d/kbAyh/U0ACglXuB
jrC5Ff6JoetsVRHa6DcgJ4ML
-----END PGP SIGNATURE-----

--8752jWCXWgM6WtY1Xho--