coio: handle spurious wakeup correctly
coio_accept, coio_read, coio_write, coio_writev used to handle spurious wakeups correctly: if the timeout hasn't passed yet, they would simply retry reading (or writing) and fall asleep once again if no data is ready. This behaviour changed in the following patches: 577a640a ("coio: pass fd to coio_accept") and 4f84859d ("Introduce iostream wrapper for socket I/O"). Now the functions timeout on the very first spurious wakeup. Fix this and add the appropriate unit tests.
Loading
Please register or sign in to comment