Corinna Vinschen wrote:

This code only exists in 1.7.  The only way to get ENOBUFS in 1.5.x is
when Winsock emits it.  I see two possible reasons.  One is a
third-party firewall software which interacts badly with ftpd on the
machine with the ENOBUFS problem, the other is ftpd itself.  Does ftpd
from 1.5 try to write the 215 Megs in one single write call, by any
chance?

Why, yes, yes it does. But only if #HAVE_MMAP; otherwise it's a little more sane and uses BUFSIZ from stdio.h; 1024.

 We had this discussion lately and I added a stop-gap measure
into 1.7 so that no write to the net writes more than 64K in one go.
The problem is that Winsock unintelligibly tries to create a temporary
internal buffer the size of the write buffer, regardless of its size.
Naturally that can fail, and if it does, you get the error code
WSAENOBUFS.  The only way around that for 1.5 is to split network writes
to smaller chunks.  Doing that is much faster on Windows, too, btw.

Yeah, I'll code that up for 1.5-4. Should I stick with BUFSIZ == 1024, or when MMAP use something a little bigger, say 32k?

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to