delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/09/18:35:23

Date: Fri, 9 Jan 1998 18:32:58 -0500 (EST)
Message-Id: <199801092332.SAA05310@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: randym AT acm DOT org
CC: djgpp-workers AT delorie DOT com
In-reply-to: <3.0.1.32.19980109062850.007c7a90@yacker.xiotech.com> (message
from Randy Maas on Fri, 09 Jan 1998 06:28:50 -0600)
Subject: Re: patch for dup2

OK, I see where you're going on this.  It does seem that dup2()ing the
low-level descriptors first, then calling fsext, makes sense.  Beware
what happens during error conditions though.

I think it can be kept simple.  Take the non-fsext dup2() and just add
a standard hook at the *end* of the function to give fsext a chance to
do its thing as well.

> I meant something else: the call to DOS needs to be done so that  even
> __FSEXT_alloc_fd() does not accidently reuse the descriptor.
> __FSEXT_alloc_fd() won't work cause we can't tell it not to use the newfd
> descriptor (because __FSEXT_alloc_fd() asks DOS for a unique descriptor and
> it does not know that the application is already using certain
> descriptors....) 

- Raw text -


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