X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Date: Thu, 10 Mar 2011 17:33:42 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com, Robert Wruck Subject: Re: 1.7.8: write fails with EAGAIN Message-ID: <20110310223342.GA15394@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com, Robert Wruck References: <4D72992D DOT 4090007 AT tweerlei DOT de> <20110307103951 DOT GL6393 AT calimero DOT vinschen DOT de> <4D77C5CB DOT 1040909 AT tweerlei DOT de> <4D77C9C8 DOT 2000802 AT cygwin DOT com> <4D77CCC4 DOT 3070406 AT tweerlei DOT de> <4D77CF7F DOT 7090009 AT tweerlei DOT de> <4D77D923 DOT 1090508 AT tweerlei DOT de> <4D793088 DOT 8050406 AT tweerlei DOT de> <20110310211141 DOT GA26446 AT ednor DOT casa DOT cgf DOT cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110310211141.GA26446@ednor.casa.cgf.cx> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Thu, Mar 10, 2011 at 04:11:41PM -0500, Christopher Faylor wrote: >On Thu, Mar 10, 2011 at 09:11:52PM +0100, Robert Wruck wrote: >>Hi, >> >>tested with cvs HEAD: >> >>> Just terminating the loop after write_overlapped_fallback is not enough. >>> When the size to write exceeds MAX_OVERLAPPED_WRITE_LEN and WriteFile >>> fails for MAX_OVERLAPPED_WRITE_LEN, write() will always return 0. >> >>Now any write with length > MAX_OVERLAPPED_WRITE_LEN fails with -1 / >>EFBIG (on the machine that has the WriteFile limitation). > >How about if you try a snapshot rather than your own home-built version? I've just run your test script a number of times and saw a failure a couple of times. It's a race condition that is fixable. The irritating thing that I noticed is that, despite returning an error, WriteFile nevertheless still writes 64K of the data. That's pretty annoying and is something that I have to fix. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple