1.7.8: write fails with EAGAIN

Brian Ford Brian.Ford@FlightSafety.com
Mon Mar 7 19:09:00 GMT 2011

On Mon, 7 Mar 2011, Christopher Faylor wrote:

> So, my options are to:
> 1) Limit the buffer size to some value like 64 mib and expect the caller to
> deal with that.
> 2) Limit the buffer size to some value like 64 mib and loop in
> fhandler_overlapped::write_overlapped until everything has been written.
> 3) Attempt the WriteFile(), notice the error condition and then do 1) or 2).
> Just thinking out loud here.  I think I've convinced myself that I should
> go with 3 + 2.

I'm not sure I understand what 3 + 2 means here, but in general, on
Windows, overlapped I/O should always be limited to 16 Mb I/Os to avoid
these types of resource issues as described here:


> max < 16M to avoid resource issues

Brian Ford
Staff Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...

More information about the Cygwin-developers mailing list