[EXTERNAL] Re: scp stalls on uploading in cygwin 3.5 current master.

Lavrentiev, Anton (NIH/NLM/NCBI) [C] lavr@ncbi.nlm.nih.gov
Sat Aug 26 14:15:36 GMT 2023

> This thread is not about send() blocking or returning EAGAIN.  This
> is about the behaviour of select(2) and poll(2).

I was merely commenting on your note that if select() returned a socket as
writable, and send() writes more than internally allowed, then send() would block.
It wouldn't!  It'd just write the allowable count, and return as a short write,
whether the socket was blocking or not.

select() and poll() whether I/O would block.  By the virtue of this,
a socket, which is in error (except for EAGAIN), is writable exactly
because write()/send() to such a socket would return -1 right away.

Anton Lavrentiev
Contractor NIH/NLM/NCBI

More information about the Cygwin mailing list