David Majnemer 8db32cc2ac [libc++] random_device fails if open returns zero
random_device::random_device(const string&) wrongly assumes that open
can only validly return a file descriptor greater than zero.

This results in random_device believing that it didn't successfully open
the device causing it to throw in it's constructor, this ends up leaking
a file descriptor.

The fix is simple, don't error on file descriptors which are zero.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@210060 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-03 02:21:37 +00:00
2014-06-02 23:37:13 +00:00
2013-09-28 01:25:55 +00:00
Description
No description provided
15 MiB
Languages
C++ 98.1%
HTML 1.2%
Python 0.4%
CMake 0.2%