On 2017-10-06 16:57, Max wrote:
GRND_RANDOM let us select randomness source.
GRND_NONBLOCK let us control blocking behavior.
After rereading the relevant documentation, I realize that I
misunderstood one critical point regarding GRND_NONBLOCK. The critical
difference is that GRND_NONBLOCK controls not only blocking behavior, it
also ensures that in the case of the system not being properly seeded,
it fails closed by immediately returning -1 without outputting any
random bytes. I apologize for completely missing this detail.
It is of course the case that you are correct and if blocking is a
problem, it is logical to set GRND_NONBLOCK and to handle the error
case, especially by terminating. That is indeed a critical error and
there should be no output.
Happy Hacking,
RS