delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4D74BDB0.1060206@tweerlei.de> |
Date: | Mon, 07 Mar 2011 12:12:48 +0100 |
From: | Robert Wruck <wruck AT tweerlei DOT de> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: 1.7.8: write fails with EAGAIN |
References: | <4D72992D DOT 4090007 AT tweerlei DOT de> <20110307103951 DOT GL6393 AT calimero DOT vinschen DOT de> |
In-Reply-To: | <20110307103951.GL6393@calimero.vinschen.de> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Hi, > Hang on, you are saying that a *blocking* write(2) to a pipe returns > with EAGAIN? Are you sure? It would be quite a surprise if git would > actually do that. EAGAIN is only an expected error for non-blocking > I/O, so applications which use blocking I/O usually only test for EINTR. since in the interesting case I'm writing to stdout (fd=1) I don't know whether that was initially opened with O_NONBLOCK - but I wouldn't think so. I was able to reproduce this as follows: ./writetest infile | cat > outfile where infile is a "large" file. The output is: $ ./writetest infile | cat > test.out writing 78954543 bytes... result is -1, errno is 11 writing 78954543 bytes... result is -1, errno is 11 ... This does not happen for "small" files: $ ./writetest infile2 | cat > test.out writing 10978848 bytes... result is 10978848, errno is 0 Also, I tried this with the same cygwin version on Win7/64-bit and this did not happen even for a 1GB file. -Robert -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |