Re: msvcrt: fill _chsize, _dup, _dup2
Hi, On Wed, Sep 15, 2004 at 06:53:28AM +0000, JustFillBug wrote:
Use the POSIX peer.
I don't think this is correct (and if it was, then it would have been done that way already, I guess). I'm not too familiar with our msvcrt, but it looks like these functions should definitely be implemented by means of our msvcrt's file handle management: msvcrt_alloc_fd(), msvcrt_alloc_fp() and many other related functions. Reason being that if you simply dup() an fd, that this properly registered source fd (in msvcrt, that is), would end up with a cloned fd that is NOT being properly registered on the msvcrt side. To make it more obvious: _close() uses msvcrt_fdtoh(), which would most likely fail for an msvcrt-foreign fd. Would be cool if you could implement it the correct way, though. Thanks, Andreas Mohr
participants (1)
-
Andreas Mohr