[Python-Dev] BDFL ruling request: should we block forever waiting for high-quality random bits?

Donald Stufft donald at stufft.io
Fri Jun 10 17:28:28 EDT 2016

> On Jun 10, 2016, at 5:21 PM, Tim Peters <tim.peters at gmail.com> wrote:
> Isn't that precisely the purpose of the GRND_NONBLOCK flag?

It doesn’t behave exactly the same as /dev/urandom. If the pool hasn’t been initialized yet /dev/urandom will return possibly predictable data whereas getrandom(GRND_NONBLOCK) will EAGAIN.

Donald Stufft

More information about the Python-Dev mailing list