From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.user Subject: Re: Catching user interrupts Date: Sat, 20 Mar 2004 23:08:35 +0100 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <871xnnp3x8.fsf@zagadka.ping.de> References: <1075819149.3257.237.camel@localhost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1079820698 24106 80.91.224.253 (20 Mar 2004 22:11:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 20 Mar 2004 22:11:38 +0000 (UTC) Cc: Guile Users Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sat Mar 20 23:11:30 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B4ogk-00067x-00 for ; Sat, 20 Mar 2004 23:11:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B4oeh-0000iz-MQ for guile-user@m.gmane.org; Sat, 20 Mar 2004 17:09:23 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B4oeY-0000gu-G8 for guile-user@gnu.org; Sat, 20 Mar 2004 17:09:14 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B4oe2-0000Yh-IB for guile-user@gnu.org; Sat, 20 Mar 2004 17:09:13 -0500 Original-Received: from [195.253.8.218] (helo=mail.dokom.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B4oe2-0000Xe-4m for guile-user@gnu.org; Sat, 20 Mar 2004 17:08:42 -0500 Original-Received: from dialin.speedway15.dip57.dokom.de ([195.253.15.57] helo=zagadka.ping.de) by mail.dokom.net with smtp (Exim 3.36 #3) id 1B4ofk-000753-00 for guile-user@gnu.org; Sat, 20 Mar 2004 23:10:28 +0100 Original-Received: (qmail 3892 invoked by uid 1000); 20 Mar 2004 22:08:35 -0000 Original-To: Andy Wingo In-Reply-To: <1075819149.3257.237.camel@localhost> (Andy Wingo's message of "Tue, 03 Feb 2004 16:39:10 +0200") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2952 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2952 Andy Wingo writes: > I'm running into trouble catching interrupts. It always works the first > time, but the second time I run a piece of code in the repl it becomes > unresponsive. For example: > > (catch #t > (lambda () (while #t #t)) > (lambda (key . args) > (if (not (eq? key 'signal)) > (apply throw key args)))) > > Try that twice in your repl. Strange. Try this variant (catch #t (lambda () (while #t #t)) (lambda (key . args) (unmask-signals) ;;; <- this is new (if (not (eq? key 'signal)) (apply throw key args)))) Somehow, signals end up being 'masked' after your code loop is interrupted. I haven't yet investigated why, tho. This problem does not occur in 1.7, which has a quite different way to handle signals internally. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user