Date: Sun, 25 Apr 1999 19:09:59 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Mark E." cc: djgpp-workers AT delorie DOT com Subject: Re: fsext patches for dup and dup2 In-Reply-To: <199904231752.RAA64682@out5.ibm.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 23 Apr 1999, Mark E. wrote: > > Here are patches to implement fsext overrides for dup and dup2. > > I revised the patch for dup2 to add the fsext code after the fd == newfd > check. I don't remember all the details after all this time (this was discussed a year ago!), but in general hooking dup and dup2 with and fsext could be mighty dangerous. The problem is that you need to make sure the handle you return will not be reused by DOS, and the only way to do that would be to call (the real) dup. DJ, do you remember the difficulties that we bumped upon when discussing this? I guess searching the mail archives of djgpp-workers (http://www.delorie.com/djgpp/mail-archives/) might provide the answer, but a few messages I found didn't really have enough details to make me remember...