Author Lukasa
Recipients Lukasa, Theodore Tso, christian.heimes, dstufft, larry, lemburg, martin.panter, ncoghlan, vstinner
Date 2016-06-09.08:14:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> But Theodore Ts'o said on the tracker: if you call getrandom() and don't pass in GRND_RANDOM, it's equivalent to /dev/urandom.  So, if getrandom is available, getrandom(flags=0) will always work and never block.

Can we please try to be clear about what kind of blocking we mean? getrandom(flags=0) absolutely *can* block: that's what the original issue was all about. To ensure it *never* blocks you need to call getrandom(GRND_NONBLOCK): that's why the flag exists.

Put another way:

- getrandom(flags=GRND_RANDOM) == /dev/random
- getrandom(flags=GRND_NONBLOCK) == /dev/urandom on Linux
- getrandom(flags=0) == /dev/urandom everywhere but Linux
Date User Action Args
2016-06-09 08:14:40Lukasasetrecipients: + Lukasa, lemburg, ncoghlan, vstinner, larry, christian.heimes, martin.panter, dstufft, Theodore Tso
2016-06-09 08:14:40Lukasasetmessageid: <>
2016-06-09 08:14:40Lukasalinkissue27266 messages
2016-06-09 08:14:40Lukasacreate