On 06/14/2016 08:07 AM, Steven D'Aprano wrote:
Is this right? I thought we had decided that os.urandom should *not*
fall back on getrandom on Linux?

We decided that os.urandom() should not *block* on Linux. Which it doesn't; we now strictly call getrandom(GRND_NONBLOCK), which will never block. getrandom() is better because it's a system call, instead of reading from a file. So it's much less messy.

If getrandom() wanted to block, instead it'll return EAGAIN, and we'll fail over to reading from /dev/urandom directly, just like we did in 3.4 and before.

It's all working as intended,


//arry/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to