getrandom.2: Add a sentence to clarify the default behavior of getrandom()

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-11-11 10:19:01 +01:00
parent a550a24de3
commit 7028ce50ab
1 changed files with 16 additions and 1 deletions

View File

@ -54,7 +54,22 @@ Therefore
.BR getrandom ()
should not be used for Monte Carlo simulations or other
programs/algorithms which are doing probabilistic sampling.
.PP
.\" FIXME is the following paragraph correct?
By default,
.BR getrandom ()
draws entropy from the
.IR /dev/urandom
pool, and, if that pool has been initialized and
.IR buflen
is less than or equal to 256 (see NOTES, below),
then the call never blocks when drawing from that pool
and always returns the number of bytes requested in
.IR buflen .
This behavior can be changed via the
.I flags
argument.
The
.I flags
argument is a bit mask that can contain zero or more of the following values