delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/17/21:06:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Thu, 17 Oct 2002 21:07:51 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: File permission problems with new cygwin dll
Message-ID: <20021018010751.GA10447@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20021017175543 DOT GA13272 AT redhat DOT com> <Pine DOT CYG DOT 4 DOT 44 DOT 0210180010440 DOT 2044-100000 AT MORDOR>
Mime-Version: 1.0
In-Reply-To: <Pine.CYG.4.44.0210180010440.2044-100000@MORDOR>
User-Agent: Mutt/1.4i

On Fri, Oct 18, 2002 at 12:19:29AM +0200, Pavel Tsekov wrote:
>On Thu, 17 Oct 2002, Christopher Faylor wrote:
>
>> On Thu, Oct 17, 2002 at 03:17:11PM +1300, Ross Smith wrote:
>> >If you take any command-line program that writes to stdout -- plain old
>> >"hello world" will do fine -- compile it with gcc, and run it several
>> >times with >> somefile, then you get a file containing several copies
>> >of "hello world", as you'd expect. But if you compile it with Visual
>> >C++ instead, then instead of appending to the file, it just overwrites
>> >the beginning of the file every time.
>>
>> Should be fixed in cvs.  I'm generating a snapshot.
>>
>> The problem was caused by this change from Pavel Tsekov:
>>
>> http://sources.redhat.com/ml/cygwin-cvs/2002-q3/msg00064.html
>>
>> I had a nagging feeling that this was a problem when it was checked in.
>>
>> My fix still keeps this patch but it resets file pointers before execing
>> a new process.  That seems to work.
>
>I should have been more careful. My mistake is that I didn't understand
>why the file pointer should be moved on open () back then. Removing this
>code fixed an "obivious" bug and seemed reasonable. Now as I looked at
>the code you've checked in dtable.cc, everything seems clear.
>
>Sorry :(

Hey, I wasn't pointing fingers! I should have made that very clear.  I
approved the checkin and I should understand the code pretty thoroughly.

I should have remembered why the file pointer code was in open.  I'm
glad that we did things this way.  Your patch makes cygwin slightly
faster and I *think* that handling the problem in exec makes things even
more correct than they were prior to your patch.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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