A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-June/145198.html below:

[Python-Dev] [Python-checkins] cpython (3.5): Fix os.urandom() using getrandom() on Linux

[Python-Dev] [Python-checkins] cpython (3.5): Fix os.urandom() using getrandom() on Linux [Python-Dev] [Python-checkins] cpython (3.5): Fix os.urandom() using getrandom() on LinuxLarry Hastings larry at hastings.org
Wed Jun 15 01:41:32 EDT 2016
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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20160614/a0deadbe/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4