From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: a little puzzle Date: Fri, 08 Oct 2010 19:32:25 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1286560218 12453 80.91.229.12 (8 Oct 2010 17:50:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Oct 2010 17:50:18 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Oct 08 19:50:17 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P4H5B-0005YO-Dy for guile-devel@m.gmane.org; Fri, 08 Oct 2010 19:50:17 +0200 Original-Received: from localhost ([127.0.0.1]:47149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4H59-00018F-Br for guile-devel@m.gmane.org; Fri, 08 Oct 2010 13:50:11 -0400 Original-Received: from [140.186.70.92] (port=46006 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4GwT-0003cU-Tz for guile-devel@gnu.org; Fri, 08 Oct 2010 13:41:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P4Gkd-0003cg-B6 for guile-devel@gnu.org; Fri, 08 Oct 2010 13:29:00 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:52485 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P4Gkd-0003cG-8b for guile-devel@gnu.org; Fri, 08 Oct 2010 13:28:59 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id ECD23DC762 for ; Fri, 8 Oct 2010 13:28:57 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=v/Vwy4mBBqhLW9LFZ/vN1kMk+Tc=; b=Biv++U H9TdUfv7qu/Xl2jBHT7DprCY7WwuhEbsqsI8tFjqBgONXhTcKdwq/6AiVYjPp3cQ LUVB9MnkRgMoniQHbIUAWMpde3hOJh76MDqpj50LlzDC9/BLM/KlMpcexQhYdRnP Nbn1GUxQoWDXgAOyDuG9wbkqO5B93bQUdOu8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=x1YfNRqGG63ZFeL5d+VVM2hZAW1DaaIj dLxDpSoqIkqf/69P3rgHSrmPqp/L2BsiMFBfa9SyUa5gYnOYaCEs3V7kk36vlh3S fNY0kcAhOpTaDdELzdR3u1uQsN4QkFPCB05kPz8foYWDZmu4bapdXjDyw9yYaNvC HsS9h0/yhXE= Original-Received: from a-pb-sasl-quonix. (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id E8C66DC760 for ; Fri, 8 Oct 2010 13:28:57 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [81.38.188.65]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 6E453DC75E for ; Fri, 8 Oct 2010 13:28:57 -0400 (EDT) In-Reply-To: (Andy Wingo's message of "Fri, 08 Oct 2010 19:14:34 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 8848340E-D301-11DF-929F-030CEE7EF46B-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11009 Archived-At: On Fri 08 Oct 2010 19:14, Andy Wingo writes: > ERROR: In procedure accept: > ERROR: Interrupted system call > Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue. > scheme@(guile-user) [1]> > Throw to key `foo' with args `()' while reading expression. > scheme@(guile-user) [1]> > > That's right: two throws for the price of one! The interrupted syscall, > and then the asynchronous signal. Fun... I propose to fix it with a patch like this: --- a/libguile/error.c +++ b/libguile/error.c @@ -147,6 +147,7 @@ void scm_syserror (const char *subr) { SCM err = scm_from_int (SCM_I_ERRNO ()); + SCM_ASYNC_TICK; scm_error (scm_system_error_key, subr, "~A", @@ -157,6 +158,7 @@ scm_syserror (const char *subr) void scm_syserror_msg (const char *subr, const char *message, SCM args, int eno) { + SCM_ASYNC_TICK; scm_error (scm_system_error_key, subr, message, I am not clear that it's guaranteed that the thread will be ready for an async though. This seems to work but it does not seem reliable. Andy -- http://wingolog.org/