unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Daniel CAUNE <danielc@in-fusio.com>
Cc: Guile-user@gnu.org
Subject: Re: Guile library behaviour
Date: 17 Apr 2002 17:19:17 +0200	[thread overview]
Message-ID: <1019056758.1612.47.camel@tedy> (raw)
In-Reply-To: <87bscifjo0.fsf@raven.i.defaultvalue.org>

[-- Attachment #1: Type: text/plain, Size: 2700 bytes --]

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. 


Daniel 


Le mer 17/04/2002 à 17:07, Rob Browning a écrit :

    Daniel CAUNE <danielc@in-fusio.com> 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 @defaultvalue.org, @linuxdevel.com, and @debian.org
    Previously @cs.utexas.edu
    GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD
    

[-- Attachment #2: Type: text/html, Size: 5021 bytes --]

  reply	other threads:[~2002-04-17 15:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-17  8:15 Guile library behaviour Daniel CAUNE
2002-04-17 12:14 ` Lynn Winebarger
2002-04-17 15:07 ` Rob Browning
2002-04-17 15:19   ` Daniel CAUNE [this message]
2002-04-17 15:21   ` Daniel CAUNE
2002-04-17 15:35     ` Daniel CAUNE
2002-04-30  4:29   ` Lynn Winebarger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1019056758.1612.47.camel@tedy \
    --to=danielc@in-fusio.com \
    --cc=Guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).