Mail Archives: djgpp-workers/1999/04/25/12:11:57
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 -