Read /dev/urandom unbuffered

To avoid wasting entropy. Bug 593232.
This commit is contained in:
Matthias Clasen
2009-08-27 22:59:05 -04:00
parent 3a47f48311
commit 3ba64e72cf

View File

@@ -181,6 +181,7 @@ g_rand_new (void)
{ {
int r; int r;
setvbuf (dev_urandom, NULL, _IONBF, 0);
do do
{ {
errno = 0; errno = 0;