GNU bug report logs - #30368
‘select’ returns non-empty sets upon EINTR or EAGAIN

Previous Next

Package: guile;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Tue, 6 Feb 2018 10:40:02 UTC

Severity: important

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


Message #10 received at 30368 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: 30368 <at> debbugs.gnu.org
Subject: Re: bug#30368: ‘select’ returns non-empty sets
 upon EINTR or EAGAIN
Date: Wed, 07 Feb 2018 14:33:58 +0100
ludo <at> 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’.




This bug report was last modified 7 years and 96 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.