From: Matthias Clasen Date: Fri, 28 Aug 2009 02:59:05 +0000 (-0400) Subject: Read /dev/urandom unbuffered X-Git-Tag: 2.21.6~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ba64e72cf40b81f472aa784498c3a97ef434c94;p=platform%2Fupstream%2Fglib.git Read /dev/urandom unbuffered To avoid wasting entropy. Bug 593232. --- diff --git a/glib/grand.c b/glib/grand.c index 55f8970..8edcca3 100644 --- a/glib/grand.c +++ b/glib/grand.c @@ -181,6 +181,7 @@ g_rand_new (void) { int r; + setvbuf (dev_urandom, NULL, _IONBF, 0); do { errno = 0;