From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: kai.selgrad@web.de Newsgroups: gmane.lisp.guile.user Subject: Re: scm_shell in C-Thread - Quit vs. Terminal Corruption Date: Sun, 18 Oct 2009 17:48:53 +0200 Message-ID: <20091018154853.GA15564@shoikan> References: <20091016190925.GA26534@shoikan> <3ae3aa420910161942y67d04163kb270dba9b05f61b3@mail.gmail.com> <20091017173618.GA5441@shoikan> <87iqec7ne2.fsf@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1255880973 15632 80.91.229.12 (18 Oct 2009 15:49:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2009 15:49:33 +0000 (UTC) Cc: guile-user@gnu.org, kai.selgrad@web.de To: Neil Jerram Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Oct 18 17:49:25 2009 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MzY0b-00061c-Dh for guile-user@m.gmane.org; Sun, 18 Oct 2009 17:49:25 +0200 Original-Received: from localhost ([127.0.0.1]:43637 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzY0a-0002VZ-UB for guile-user@m.gmane.org; Sun, 18 Oct 2009 11:49:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzY0E-0002VI-Kf for guile-user@gnu.org; Sun, 18 Oct 2009 11:49:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzY09-0002Uk-Py for guile-user@gnu.org; Sun, 18 Oct 2009 11:49:01 -0400 Original-Received: from [199.232.76.173] (port=57861 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzY09-0002Uh-L2 for guile-user@gnu.org; Sun, 18 Oct 2009 11:48:57 -0400 Original-Received: from fmmailgate03.web.de ([217.72.192.234]:51836) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzY09-000386-6K for guile-user@gnu.org; Sun, 18 Oct 2009 11:48:57 -0400 Original-Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate03.web.de (Postfix) with ESMTP id D7D6812739081; Sun, 18 Oct 2009 17:48:55 +0200 (CEST) Original-Received: from [84.56.110.172] (helo=localhost) by smtp08.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.110 #314) id 1MzY06-0003Fj-00; Sun, 18 Oct 2009 17:48:54 +0200 Content-Disposition: inline In-Reply-To: <87iqec7ne2.fsf@ossau.uklinux.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-Sender: kai.selgrad@web.de X-Provags-ID: V01U2FsdGVkX1/R1wX+QV+dN5XUpg+u2g+Btj5Giaep+/XxFJrK rn07UMECLWJZC5YUsN7TXzePZsUOjlg+RjTPyNvv1bZxzcdE6R sK3N7JKdg= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:7456 Archived-At: Hej Neil. On 16:05 Sun 18 Oct , Neil Jerram wrote: > Calling scm_shell() with no args means just that that thread will run > `(top-repl)' - whose definition you can see in boot-9.scm. In other > words you could say that the default args are like `-c (top-repl)'. > > `(quit)' means (throw 'quit ...), and the (top-repl) code handles this > by exiting its internal loop. Then scm_shell() calls exit(). > > So, if you want something else to happen after `(quit)', such as waiting > for other threads to terminate and clean up, you just need to put code > for that in a procedure named, e.g. `wait-for-cleanup', and then call > scm_shell() with args `-c (begin (top-repl) (wait-for-cleanup)'. That sounds pretty good, thank you! I think I should be able to get my stuff working with this information. :) I will give it a try this week. Kai.