win,fs: don't close fd 0-2

PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
Bert Belder 2015-06-10 17:18:34 -07:00
parent f6fc5dd57d
commit c619f37c39

View File

@ -528,7 +528,11 @@ void fs__close(uv_fs_t* req) {
VERIFY_FD(fd, req);
result = _close(fd);
if (fd > 2)
result = _close(fd);
else
result = 0;
SET_REQ_RESULT(req, result);
}