From: Andy Wingo <wingo@pobox.com>
To: guile-devel <guile-devel@gnu.org>
Subject: Re: a little puzzle
Date: Fri, 08 Oct 2010 19:32:25 +0200 [thread overview]
Message-ID: <m3ocb4fv4m.fsf@unquote.localdomain> (raw)
In-Reply-To: <m3sk0gfvyd.fsf@unquote.localdomain> (Andy Wingo's message of "Fri, 08 Oct 2010 19:14:34 +0200")
On Fri 08 Oct 2010 19:14, Andy Wingo <wingo@pobox.com> 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/
next prev parent reply other threads:[~2010-10-08 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-08 17:14 a little puzzle Andy Wingo
2010-10-08 17:32 ` Andy Wingo [this message]
2010-10-10 14:58 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3ocb4fv4m.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).