bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#30368: ‘select’ returns non-empty sets upon EINTR or EAGAIN


From: Ludovic Courtès
Subject: bug#30368: ‘select’ returns non-empty sets upon EINTR or EAGAIN
Date: Wed, 07 Feb 2018 14:33:58 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

address@hidden (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 via email to

[Prev in Thread] Current Thread [Next in Thread]