[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guile library behaviour

From: Daniel CAUNE
Subject: Re: Guile library behaviour
Date: 17 Apr 2002 17:21:37 +0200

Oups, sorry! I've sent my answer too quickly! Can you tell me which version of the Guile library that implements the scm_init_guile?


Le mer 17/04/2002 à 17:07, Rob Browning a écrit :
Daniel CAUNE <address@hidden> writes:

> Last night I went deeper in the Guile library code and I saw the
> reason of my application server shutdown. After invoking the
> gh_enter function, the first function that is called after the Guile
> initialization is the function gl_launch_pad, which calls my own
> function and then calls the exit system function. Then all my
> application server shutdowns!

If I understand your problem/question it sounds like you were
expecting to call gh_enter (or scm_boot_guile) to initialize guile and
then have the function return so you can do other things.  If so, this
isn't how these functions work.  Check the info pages, but these
functions expect you to hand them your "real main function", one whose
return indicates the termination of the app just like returning from
main() normally does.

The original reason for this is just as Lynn explained it -- this used
to be the only way guile could portably find the bottom of the stack.
Also note that as things stand now, you can only run one copy of guile
inside any given app.

In general, if you're the one designing the app, the requirement that
guile be handed your real main function isn't a big deal, but in some
cases this isn't possible.  Fortunately, in more recent versions of
guile, clever people have figured out a fairly portable way to find
the bottom of the stack, and so on those platforms, you can use
scm_init_guile, which will return, and then you can go do whatever
else you want in your code.

Hope this helps.

Rob Browning
rlb,, and
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD

reply via email to

[Prev in Thread] Current Thread [Next in Thread]