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

To: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Date: Sun, 27 Feb 2000 15:32:18 -0800
From: "Ken Yap" <ken_yap AT my-deja DOT com>
Message-ID: <NGDPIMGFFIHBBCAA@my-deja.com>
Mime-Version: 1.0
Cc: djgpp AT delorie DOT com
X-Sent-Mail: off
X-Mailer: MailCity Service
Subject: Re: why isn't the FSEXT hook implemented for dup in 2.03?
X-Sender-Ip: 210.8.224.2
Organization: My Deja Email (http://www.my-deja.com:80)
Reply-To: djgpp AT delorie DOT com

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

The problem is the WATT-32 dup needs to be called to do the right thing
for a socket dup and there is no hook from djgpp to call the extension
dup, so WATT-32's dup never gets called. Open doesn't come into it at all.

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

If I can figure out what's going on.



--== Sent via Deja.com http://www.deja.com/ ==--
Share what you know. Learn what you don't.

- Raw text -


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