| delorie.com/archives/browse.cgi | search | 
| From: | "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be> | 
| To: | <djgpp-workers AT delorie DOT com>, "'Eli Zaretskii'" <eliz AT is DOT elta DOT co DOT il> | 
| Cc: | "'Charles Sandmann'" <sandmann AT clio DOT rice DOT edu> | 
| Subject: | Re: freopen/_creat(w2k) interaction [was: Re: Build problems] | 
| Date: | Wed, 19 Sep 2001 09:27:29 +0200 | 
| Message-ID: | <000001c140dc$8aad98e0$1ef8e0d5@pandora.be> | 
| MIME-Version: | 1.0 | 
| X-Priority: | 3 (Normal) | 
| X-MSMail-Priority: | Normal | 
| X-Mailer: | Microsoft Outlook, Build 10.0.2627 | 
| In-reply-to: | <10109171455.AA03227@clio.rice.edu> | 
| Importance: | Normal | 
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4807.1700 | 
| 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 | 
> Since I've got a working freopen patch, I'll post/commit it after I > look at it again. Pretty trivial (about 5 lines). > > > > I think that assuming handles return in previous slot is > a bad assumption; > > > this could be causing problems with programs that close > stdaux and stdprn > > > for example (they would get allocated first). > > > > So? What's wrong with that? > > Scenario (may not be real): > I close handles 3 & 4 (stdaux,stdprn). I freopen a file > structure that > was on handle 5 - it will now be on handle 3. If someone expected a > same handle (saved fileno or something) would not work. This sounded like it might provide a fix for the Perl problems that were apparently caused by the closing of stdaux and stdprn. Unfortunately, this seems not to be the case; I rebuilt perl 5.7.2 with the current CVS libc (and with libc's popen/pclose instead of the local version in Perl's djgpp.c) - spawned subprograms still have the same issues unless I disable the closing of stdaux and stdprn.
| webmaster | delorie software privacy | 
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |