[issue27266] Always use getrandom() in os.random() on Linux and add block=False parameter to os.urandom()

Larry Hastings report at bugs.python.org
Thu Jun 9 03:57:49 EDT 2016


Larry Hastings added the comment:

> I wonder what we should do on Linux if /dev/urandom is unavailable and getrandom() would block.

I don't think that happens.

getrandom() actually supports two flags.  The flag GRND_RANDOM tells it "behave like /dev/random".  If you don't pass in GRND_RANDOM, it behaves like "/dev/urandom".  So it's hard to imagine that you could have getrandom() and not have /dev/urandom.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27266>
_______________________________________


More information about the Python-bugs-list mailing list