Date: Sun, 27 Feb 2000 10:11:01 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Ken Yap cc: djgpp AT delorie DOT com Subject: Re: why isn't the FSEXT hook implemented for dup in 2.03? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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 ;-).