getrandom.2: Clarify sentence on getrandom() and partial GRND_RANDOM reads

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-01-22 21:36:04 +01:00
parent 978323c72e
commit 28ef3452e4
1 changed files with 5 additions and 3 deletions

View File

@ -224,7 +224,7 @@ is not specified and
.I buflen
is less than or equal to 256,
a return of fewer bytes than requested should never happen,
but the careful user-space code should check for this anyway!
but the careful programmer will check for this anyway!
.SS Choice of random device
Unless you are doing long-term key generation (and perhaps not even
then), you probably shouldn't be using
@ -235,9 +235,11 @@ are quite conservative, and so should be sufficient for all purposes.
The disadvantage of
.B GRND_RANDOM
is that it can block.
Furthermore, dealing with partially fulfilled
Furthermore, dealing with the partially fulfilled
.BR getrandom ()
requests increases code complexity.
requests that can occur when using
.B GRND_RANDOM
increases code complexity.
.SS Emulating OpenBSD's getentropy()
The
.BR getentropy ()