Mail Archives: djgpp/2000/02/27/04:18:35
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 -