www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/25/12:11:57

Date: Sun, 25 Apr 1999 19:09:59 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: "Mark E." <snowball3 AT usa DOT net>
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: <Pine.SUN.3.91.990425190529.7199G-100000@is>
MIME-Version: 1.0
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

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... 

- Raw text -


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