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: Guile library behaviour Date: 17 Apr 2002 10:15:57 +0200 Sender: guile-user-admin@gnu.org Message-ID: <1019031358.3287.68.camel@tedy> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-5yd1oyX1JPdFDKM2V0Hq" X-Trace: main.gmane.org 1019031944 24131 127.0.0.1 (17 Apr 2002 08:25:44 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 17 Apr 2002 08:25:44 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16xkl5-0006H6-00 for ; Wed, 17 Apr 2002 10:25:43 +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 16xkgc-00044f-00; Wed, 17 Apr 2002 04:21:06 -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 16xke2-0003zw-00 for ; Wed, 17 Apr 2002 04:18:26 -0400 Original-Received: from tedy.in-fusio.com (unknown [213.11.10.81]) by mail.fr.uu.net (Postfix) with ESMTP id 2211F31D52 for ; Wed, 17 Apr 2002 10:16:36 +0200 (MET DST) Original-To: Guile-user@gnu.org 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:201 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:201 --=-5yd1oyX1JPdFDKM2V0Hq Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, 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! I can replace this gh_launch_pad by my own launcher function, but I think my problem'll stay the same since the scm_boot_guile also calls the exit system function when ending. The code documentation explains that "(...) scm_boot_guile function exits, rather than returning, to discourage people from making that mistake.". "Yes, I see", to use the favorite reply of Ryo Hazuki ! I don't clearly understand the main idea of the Guile library initialization design. How can use it in an application that must be independent from a script interpreter (dynamic load and unload)? Any ideas? Daniel >Hi, > >I'm encountering some problems with a development at home of a small >server application in C++ using the Guile dynamic libraries for the >Windows platform, included in the file guile-1.4.zip downloaded from >http://www.textsure.net/~ela/download/. > >One of my application's thread dynamically loads the Guile library >(dynamic binding) and calls the gh_enter function (i.e. scm_boot_guile) >to initialize the Scheme interpreter, and then... all the application's >process shutdowns brutally! I was a bit confused, so I've developped a >mono-threaded application to test this Guile library (static binding), >and it rocks! > >So I've trie to investigate further, debugging the assembly code of the >Guile library called by my server application code (this library doesn't >include debug information, but I get the Guile source files from GNU web >site), and trying to understand where it sucks. > >I've followed my instruction pointer until the scm_internal_lazy_catch >code (throw.c) where I lost it, my baby crying and asking for her milk >in the darkness of the night... Return to the reallity! I'll certainly >continue my quest tonight, but I would prefer that a valiant knight, or >a magician, gives here the exact reason of my trouble, if he've already >encountered it. > >Thanks! > > >Daniel > >________________________________________ >"Thuong nhau qua, can nhau dau..." --=-5yd1oyX1JPdFDKM2V0Hq Content-Type: text/html; charset=utf-8 Hi,

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!

I can replace this gh_launch_pad by my own launcher function, but I think my problem'll stay the same since the scm_boot_guile also calls the exit system function when ending. The code documentation explains that "(...) scm_boot_guile function exits, rather than returning, to discourage people from making that mistake.". "Yes, I see", to use the favorite reply of Ryo Hazuki !

I don't clearly understand the main idea of the Guile library initialization design. How can use it in an application that must be independent from a script interpreter (dynamic load and unload)?

Any ideas?


Daniel



>Hi,
>
>I'm encountering some problems with a development at home of a small
>server application in C++ using the Guile dynamic libraries for the
>Windows platform, included in the file guile-1.4.zip downloaded from
>http://www.textsure.net/~ela/download/.
>
>One of my application's thread dynamically loads the Guile library
>(dynamic binding) and calls the gh_enter function (i.e. scm_boot_guile)
>to initialize the Scheme interpreter, and then... all the application's
>process shutdowns brutally! I was a bit confused, so I've developped a
>mono-threaded application to test this Guile library (static binding),
>and it rocks!
>
>So I've trie to investigate further, debugging the assembly code of the
>Guile library called by my server application code (this library doesn't
>include debug information, but I get the Guile source files from GNU web
>site), and trying to understand where it sucks.
>
>I've followed my instruction pointer until the scm_internal_lazy_catch
>code (throw.c) where I lost it, my baby crying and asking for her milk
>in the darkness of the night... Return to the reallity! I'll certainly
>continue my quest tonight, but I would prefer that a valiant knight, or
>a magician, gives here the exact reason of my trouble, if he've already
>encountered it.
>
>Thanks!
>
>
>Daniel
>
>________________________________________
>"Thuong nhau qua, can nhau dau..." --=-5yd1oyX1JPdFDKM2V0Hq-- _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user