Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
windows/fs: handle _open_osfhandle() failure correctly
Until now we assumed that _open_osfhandle() would set _doserrno on failure. This assumption was very wrong in one obvious case, namely when the CRT file descriptor table would fill up. In that case errno is set to EMFILE, but GetLastError() returns zero - which makes sense because it's not a win32 error but rather a CRT problem.
- Loading branch information