"Juan Lang" <juan_lang(a)yahoo.com> wrote:
+ if (DuplicateHandle(GetCurrentProcess(), MSVCRT_fdesc[od].handle, + GetCurrentProcess(), &handle, 0, + !(MSVCRT_fdesc[od].wxflag & WX_DONTINHERIT), DUPLICATE_SAME_ACCESS)) + { + ret = msvcrt_alloc_fd(handle, MSVCRT_fdesc[od].wxflag); + if (ret == -1) + *MSVCRT__errno() = MSVCRT_EMFILE; + }
You need to close duplicated handle in the case of msvcrt_alloc_fd failure. -- Dmitry.
--- Dmitry Timoshkov <dmitry(a)baikal.ru> wrote:
You need to close duplicated handle in the case of msvcrt_alloc_fd failure.
Ah, indeed. I'm working on _dup2, I'll correct and resend with that. Thanks Dmitry. --Juan __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo
participants (2)
-
Dmitry Timoshkov -
Juan Lang