From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.user Subject: Re: Guile library behaviour Date: Wed, 17 Apr 2002 10:07:27 -0500 Sender: guile-user-admin@gnu.org Message-ID: <87bscifjo0.fsf@raven.i.defaultvalue.org> References: <1019031358.3287.68.camel@tedy> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019056243 31585 127.0.0.1 (17 Apr 2002 15:10:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 17 Apr 2002 15:10:43 +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 16xr51-0008DK-00 for ; Wed, 17 Apr 2002 17:10: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 16xr3S-0007Wd-00; Wed, 17 Apr 2002 11:09:06 -0400 Original-Received: from dsl-209-87-109-2.constant.com ([209.87.109.2] helo=defaultvalue.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16xr1y-0007PR-00 for ; Wed, 17 Apr 2002 11:07:34 -0400 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 44548E75; Wed, 17 Apr 2002 10:07:33 -0500 (CDT) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id BB04911CE; Wed, 17 Apr 2002 10:07:27 -0500 (CDT) Original-To: Daniel CAUNE In-Reply-To: <1019031358.3287.68.camel@tedy> (Daniel CAUNE's message of "17 Apr 2002 10:15:57 +0200") Original-Lines: 37 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) 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:205 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:205 Daniel CAUNE 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 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user