X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Eric Blake <ebb9@byu.net>
Subject:  Re: [Spam?]Re: problem concating (>>) to a large file
Date: Tue, 29 May 2007 15:28:49 +0000 (UTC)
Lines: 20
Message-ID:  <loom.20070529T172200-251@post.gmane.org>
References:  <001201c79ea3$4d82bce0$8500a8c0@RUSNAK> <4656D47E.5050906@byu.net> <001201c79f49$b57b3c90$8500a8c0@RUSNAK> <46582F2B.2000300@byu.net> <000001c7a1d8$c2178e40$8500a8c0@RUSNAK> <loom.20070529T161539-287@post.gmane.org>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Eric Blake <ebb9 <at> byu.net> writes:

> Somehow, when the file size is huge, cygwin is not properly propogating that 
an 
> O_APPEND bit (0x9 in the flags printed from F_GETFL) means that the initial 
> offset of fd 1 is the end of the file.  (And it would be nice if strace would 
> show the initial lseek offset of all inherited fd's when spawning a process).

Actually, there is another cygwin bug.  POSIX requires that this assertion 
succeed:

assert (0 == lseek (open("existing", O_WRONLY | O_APPEND), 0, SEEK_CUR));

which is currently not the case on small files.  The file position is only 
moved as part of the subsequent write()s.

-- 
Eric Blake




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

