X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f Date: Fri, 11 Jan 2002 09:43:23 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: sandmann AT clio DOT rice DOT edu (Charles Sandmann) Message-Id: <2110-Fri11Jan2002094322+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.1.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <10201110400.AA20996@clio.rice.edu> (sandmann@clio.rice.edu) Subject: Re: frlist.c proposed patch References: <10201110400 DOT AA20996 AT clio DOT rice DOT edu> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: sandmann AT clio DOT rice DOT edu (Charles Sandmann) > Date: Thu, 10 Jan 2002 22:00:01 -0600 (CST) > > This fixes the problem of incorrect flushing of a handle if the parent has > closed handle 3 or 4. Test program _close(3); _close(4); system("test.exe"); > The child opens a file writes and exits. without patch it doesn't flush, > with patch it does. Thanks. > This isn't a complete fix for all cases, but it > does make sure we don't set up extra file structures which will be closed > that shouldn't. What would it take to solve the more general problem? > Should I use fileno() or hard code (efficiency vs data driven) If you #include , fileno will be a macro instead of a function. > Should we invalidate the handle in the file structure if not open? Sorry, I don't understand what does ``invalidate the handle in the file structure'' mean.