Hello,

yelninei--- via Bug reports for the GNU Hurd, le lun. 01 sept. 2025 14:36:32 
+0200, a ecrit:
> Trying to use streamio with O_NONBLOCK and select results in select claiming 
> that the fd is readable but when trying to read returning EWOULDBLOCK.
> 
> 
> Removing the O_NONBLOCK check inĀ io_select_common makes select behaveĀ  (I 
> tried with timeout of NULL, 0 and 10s)

This O_NONBLOCK check indeed looks wrong: select() is not supposed to be
affected by O_NONBLOCK, and just block. Does your system work fine with
that change? We should probably land it, patch welcome!

> however the input_buffer stays empty forever so it is never woken up. Any 
> ideas?

Does device_read_reply_inband get called with errorcode == D_WOULD_BLOCK?

I wonder if in that case we'd be supposed to call start_input again, to
make another device_read request. If that second request gets
D_WOULD_BLOCK immediately, there is something wrong in the kernel driver
itself that doesn't manage to let us block.

Samuel

Reply via email to