This is the mail archive of the
guile@sources.redhat.com
mailing list for the Guile project.
taking over main?
- To: guile at sourceware dot cygnus dot com
- Subject: taking over main?
- From: Han-Wen Nienhuys <hanwen at cs dot uu dot nl>
- Date: Mon, 17 Jul 2000 19:45:47 +0200 (CEST)
- Reply-To: hanwen at cs dot uu dot nl
I'm just briefly looking at the way GUILE boots, and why it takes over
main. If I understand correctly, the real problem is not initializing
the GC. That simply amounts to exporting start_stack (), but rather
how to handle some types of exceptions, right?
I am seeing
setjmp_val = setjmp (SCM_JMPBUF (scm_rootcont));
if (!setjmp_val)
{
scm_set_program_arguments (closure->argc, closure->argv, 0);
scm_internal_lazy_catch (SCM_BOOL_T, invoke_main_func, closure,
scm_handle_by_message, 0);
}
which I read as: remember this spot, and execute main_func(). In
other words, there is some way to jump towards this code:
scm_restore_signals ();
/* This tick gives any pending
* asyncs a chance to run. This must be done after
* the call to scm_restore_signals.
*/
SCM_ASYNC_TICK;
Why is this here? When is this invoked?
--
Han-Wen Nienhuys | hanwen@cs.uu.nl | http://www.cs.uu.nl/~hanwen/