[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:19:17 +0200

I understand what you mean. I think the Guile library doesn't to fit the requirements of my server application. This application provides the following features:

o load and unload script interpreters' dynamic libraries (all these libraries implement a specific interface) on client application demand;
o execute a given script code on one of the loaded script intepreters.

The code script interpreter mustn't take the hand on my application's thread for ever, and it mustn't stop my process when a client application sends a request to the server so that it unloads the script interpreter's library. So I'm afraid I won't be able to use the Guile library, even if it was so easy to integrate to my project.

Thanks for you support.


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]