This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Lukasa, Theodore Tso, christian.heimes, dstufft, larry, lemburg, martin.panter, ncoghlan, vstinner
Date 2016-06-09.09:15:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAMpsgwZvUHk1WYsdaDMgDV20vX0XapE8GfTj2NZRknJTZhNAFQ@mail.gmail.com>
In-reply-to <1465459874.76.0.988827305934.issue27266@psf.upfronthosting.co.za>
Content
Christian Heimes added the comment:
> I'm -1 on a block=True/False parameter. It makes the API more awkward and will make people move away from os.urandom() to a self-made RNG because they perceive os.urandom() as potential blocking.

Are you against the feature of the API (function name/parameter name)?
If it's just the API, could you please propose something better?

> Victor, you can use sysctl on all BSD and Linux to check if the RNG has been seeded. On Linux it is kernel.random.entropy_avail >= kernel.random.read_wakeup_threshold. On BSD it is kern.random.sys.seeded == 1.

I know for BSD, but I failed to find a way to get access to a FreeBSD
where kern.random.sys.seeded is still zero.

For Linux, is kernel.random.entropy_avail related to /dev/random? In
my tests, reading from /dev/urandom never blocks even before urandom
is initialized.

=> see msg267974
History
Date User Action Args
2016-06-09 09:15:08vstinnersetrecipients: + vstinner, lemburg, ncoghlan, larry, christian.heimes, martin.panter, dstufft, Lukasa, Theodore Tso
2016-06-09 09:15:08vstinnerlinkissue27266 messages
2016-06-09 09:15:08vstinnercreate