[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] mi: Make sure fd is non-blocking before select+read
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] mi: Make sure fd is non-blocking before select+read |
Date: |
Tue, 12 May 2020 19:21:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Tim.
On Linux, select() may report a socket file descriptor as
"ready for reading", while nevertheless a subsequent read blocks.
2020-05-12 Tim Rühsen <address@hidden>
* poke/pk-mi.c (pk_mi_fd_set_nonblocking): New function.
(pk_mi_fd_restore_blocking): New function.
(pk_mi_loop): Set fd to blocking and restore before
returning.
OK for master.
Thank you!