On Aug 25 23:27, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:
> > While select indicates that
> > data can be written, it doesn't indicate how much data can be written.
> > I. e., if select returns, and there's only buffer space for 10 bytes,
> > and the send call tries to send 100 bytes, it *will* block, unless the
> > socket is non-blocking and returns EAGAIN.
> 
> IIRC, if there's space for 10 bytes in the internal buffer, send(100)
> will return 10, whether or not the socket is blocking.

It doesn't, afaics.  It raises the buffer size until something a bit
less than 512K and then it starts blocking.

> EAGAIN is only returned when nothing at all can be written to a
> non-blocking socket; or send() blocks (when blocking).

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


Corinna

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
  • scp stalls on uploading in... Takashi Yano via Cygwin
    • Re: scp stalls on upl... Takashi Yano via Cygwin
      • Re: scp stalls on... Corinna Vinschen via Cygwin
        • Re: scp stall... Takashi Yano via Cygwin
          • Re: scp s... Corinna Vinschen via Cygwin
            • RE: ... Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
              • ... Corinna Vinschen via Cygwin
                • ... Corinna Vinschen via Cygwin
                • ... Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
                • ... Corinna Vinschen via Cygwin
                • ... Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
                • ... Corinna Vinschen via Cygwin
            • Re: ... Takashi Yano via Cygwin
              • ... Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
                • ... Takashi Yano via Cygwin
                • ... Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
                • ... Takashi Yano via Cygwin
                • ... Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
                • ... Takashi Yano via Cygwin

Reply via email to