From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14216 invoked by alias); 18 Oct 2002 01:06:23 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 14208 invoked from network); 18 Oct 2002 01:06:21 -0000 Received: from unknown (HELO redhat.com) (66.30.22.225) by sources.redhat.com with SMTP; 18 Oct 2002 01:06:21 -0000 Received: by redhat.com (Postfix, from userid 201) id D65961B9BF; Thu, 17 Oct 2002 21:07:51 -0400 (EDT) Date: Thu, 17 Oct 2002 19:03:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: File permission problems with new cygwin dll Message-ID: <20021018010751.GA10447@redhat.com> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20021017175543.GA13272@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2002-10/txt/msg01071.txt.bz2 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/