unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 30368@debbugs.gnu.org
Subject: bug#30368: ‘select’ returns non-empty sets upon EINTR or EAGAIN
Date: Wed, 07 Feb 2018 14:33:58 +0100	[thread overview]
Message-ID: <87y3k4zzy1.fsf@gnu.org> (raw)
In-Reply-To: <87y3k67671.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 06 Feb 2018 11:39:30 +0100")

ludo@gnu.org (Ludovic Courtès) skribis:

> On 2.2.3, it prints:
>
> $ guile select.scm
>
>
> ;;; (signal! (2))
> ;;; (reading-from #<input: file /dev/pts/9>)
>
>>From there on it’s stuck in a read(0, …) call.
>
> The attached patch fixes it by clearing the returned FD sets on
> EINTR/EAGAIN.

There’s a case where we can get a “fake” EINTR that doesn’t come from
the underlying select(2) call: when the ‘scm_i_prepare_to_wait_on_fd’
call in ‘scm_std_select’ returns 1, which happens when new asyncs have
been queued.

Ludo’.





  reply	other threads:[~2018-02-07 13:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 10:39 bug#30368: ‘select’ returns non-empty sets upon EINTR or EAGAIN Ludovic Courtès
2018-02-07 13:33 ` Ludovic Courtès [this message]
2018-02-16 14:33 ` Ludovic Courtès

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=87y3k4zzy1.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=30368@debbugs.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).