From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Daniel CAUNE Newsgroups: gmane.lisp.guile.user Subject: Re: Guile library behaviour Date: 17 Apr 2002 17:35:28 +0200 Sender: guile-user-admin@gnu.org Message-ID: <1019057728.1801.64.camel@tedy> References: <1019031358.3287.68.camel@tedy> <87bscifjo0.fsf@raven.i.defaultvalue.org> <1019056897.1513.50.camel@tedy> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-chdL8fa/o0fkhdHsKcne" X-Trace: main.gmane.org 1019057995 2862 127.0.0.1 (17 Apr 2002 15:39:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 17 Apr 2002 15:39:55 +0000 (UTC) Cc: Guile-user@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16xrXG-0000jw-00 for ; Wed, 17 Apr 2002 17:39:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16xrWT-0002V9-00; Wed, 17 Apr 2002 11:39:05 -0400 Original-Received: from smtp2.fr.uu.net ([194.98.0.8] helo=mail.fr.uu.net) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16xrTh-0002Or-00 for ; Wed, 17 Apr 2002 11:36:13 -0400 Original-Received: from tedy.in-fusio.com (unknown [213.11.10.81]) by mail.fr.uu.net (Postfix) with ESMTP id 22063322B2; Wed, 17 Apr 2002 17:36:03 +0200 (MET DST) Original-To: Rob Browning In-Reply-To: <1019056897.1513.50.camel@tedy> X-Mailer: Ximian Evolution 1.0.3 Errors-To: guile-user-admin@gnu.org X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.user:208 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:208 --=-chdL8fa/o0fkhdHsKcne Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I answer to my question: version 1.5. Does somebody has already made a win32 dynamic link library with the Guile source 1.5, so that I can use easily?... ;-) Le mer 17/04/2002 =E0 17:21, Daniel CAUNE a =E9crit : 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?=20 =20 Daniel=20 =20 Le mer 17/04/2002 =E0 17:07, Rob Browning a =E9crit :=20 Daniel CAUNE writes: =20 > 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 Gu= ile > 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! =20 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, t= his isn't how these functions work. Check the info pages, but these functions expect you to hand them your "real main function", one wh= ose return indicates the termination of the app just like returning fro= m main() normally does. =20 The original reason for this is just as Lynn explained it -- this u= sed to be the only way guile could portably find the bottom of the stac= k. Also note that as things stand now, you can only run one copy of gu= ile inside any given app. =20 In general, if you're the one designing the app, the requirement th= at guile be handed your real main function isn't a big deal, but in so= me 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. =20 Hope this helps. =20 --=20 Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG=3D1C58 8B2C FB5E 3F64 EA5C 64AE 78FE E5FE F0CB A0AD =20 --=-chdL8fa/o0fkhdHsKcne Content-Type: text/html; charset=utf-8 I answer to my question: version 1.5.

Does somebody has already made a win32 dynamic link library with the Guile source 1.5, so that I can use easily?... ;-)


Le mer 17/04/2002 à 17:21, Daniel CAUNE a écrit :
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?

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
--=-chdL8fa/o0fkhdHsKcne-- _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user