delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/05/29/13:28:54

X-Spam-Check-By: sourceware.org
Date: Tue, 29 May 2007 19:28:32 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [Spam?]Re: problem concating (>>) to a large file
Message-ID: <20070529172832.GF6003@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <001201c79ea3$4d82bce0$8500a8c0 AT RUSNAK> <4656D47E DOT 5050906 AT byu DOT net> <001201c79f49$b57b3c90$8500a8c0 AT RUSNAK> <46582F2B DOT 2000300 AT byu DOT net> <000001c7a1d8$c2178e40$8500a8c0 AT RUSNAK> <loom DOT 20070529T161539-287 AT post DOT gmane DOT org> <loom DOT 20070529T172200-251 AT post DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <loom.20070529T172200-251@post.gmane.org>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On May 29 15:28, Eric Blake wrote:
> 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.

I fixed both bugs in CVS.  It's rather disappointing that

  SetFilePointer (handle, 0, NULL, FILE_END);

fails for files > 4Gigs.  It's actually required that the offset_high
pointer is a valid pointer to a LONG containing 0.  Oh well.

Thanks for the report and the testcase.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019