Message267821
Larry Hastings (msg267818, on the issue #26839):
> What is the default value of the "block" parameter?
False
> If called with block=False on FreeBSD, where /dev/urandom may block sometimes, what does the function do?
The function blocks.
In which case FreeBSD urandom can block?
Is there a way to read from /dev/urandom without blocking? If not, _PyOS_URandom() may use arc4random() on FreeBSD if block is false. I suggest to enhance _PyOS_URandom() after the Python 3.5.2 release.
My patch is a quick fix for Python 3.5.2, it can be enhanced later.
I chose to only modify the behaviour on Linux since issues #26839 and #25420 were only reported on Linux. |
|
Date |
User |
Action |
Args |
2016-06-08 09:43:02 | vstinner | set | recipients:
+ vstinner |
2016-06-08 09:43:02 | vstinner | set | messageid: <1465378982.59.0.637663701118.issue27266@psf.upfronthosting.co.za> |
2016-06-08 09:43:02 | vstinner | link | issue27266 messages |
2016-06-08 09:43:02 | vstinner | create | |
|