This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: Guile and alarm(2)
Jim Blandy <jimb@red-bean.com> writes:
> > The reason i'm asking this is that in Apache, one can set hard
> > timeouts, which work by calling alarm(2), and aborting all
> > processing. I'm sure that at least in those areas who are usually
> > secured by SCM_DEFER_INTS / SCM_ALLOW_INTS, such an interrupt
> > (without resumeing the original processing) would cause alot of
> > trouble. Right?
>
> Yes. You will have some problems if you try to simply abort out of
> arbitrary Guile code. The garbage collector, for instance.
>
> Does Apache provide any way for modules to establish a little more
> control over this?
Yes it does, very similar to Guile itself:
ap_block_alarms(); and ap_unblock_alarms();
The problem is, i'm not sure when i need to call them (for
guile).
Should i call it every time i'm using a scm_*/gh_* function (that
would thwart the original intent of the Apache timeout API)?
-forcer
--
((email . "forcer@mindless.com") (www . "http://forcix.cx/")
(irc . "forcer@#StarWars (IRCnet)") (gpg . "/other/forcer.gpg"))