delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/27/04:18:35

Date: Sun, 27 Feb 2000 10:11:01 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Ken Yap <ken_yap AT my-deja DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: why isn't the FSEXT hook implemented for dup in 2.03?
In-Reply-To: <KDOGEMACGHGJACAA@my-deja.com>
Message-ID: <Pine.SUN.3.91.1000227101040.14604N-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 26 Feb 2000, Ken Yap wrote:

> I'm using WATT-32 under DJGPP. WATT-32 implements dup for sockets
> with a use count. The text mode W3M browser (which I ported to DJGPP
> recently) uses dup in this way for ftp URLs:
> 
> ftprchan = fdopen(fd, "rb");
> ftpwchan = fdopen(dup(fd), "wb");

I don't understand why the normal dup won't do in this case.  You
*can* call dup and dup2 on the handle returned by the FSEXT, because
it's a valid DOS handle.  And since you hooked _open, the new handle
gets hooked inside that handler, right?  So where is the problem?

> It's not critical but it would be nice if DJGPP did the right thing for dup.

I'm sure your patches to add this would be greatly appreciated ;-).

- Raw text -


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