This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.7.8: write fails with EAGAIN


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:

http://cygwin.com/ml/cygwin-developers/2010-10/msg00053.html

> 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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]