mirror of https://github.com/mkerrisk/man-pages
getrandom.2: Rework GRND_RANDOM text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
3426471b46
commit
0646abd614
|
@ -104,17 +104,18 @@ in the
|
|||
argument.
|
||||
.TP
|
||||
.B GRND_NONBLOCK
|
||||
By default, if there are no random bytes available at all (when reading from
|
||||
.IR /dev/random ),
|
||||
or the entropy pool has not yet been initialized (when reading from
|
||||
.IR /dev/urandom ),
|
||||
By default, when reading from
|
||||
.IR /dev/random ,
|
||||
.BR getrandom ()
|
||||
blocks until data is available.
|
||||
blocks if no random bytes are available,
|
||||
and when reading from
|
||||
.IR /dev/urandom ,
|
||||
it blocks if the entropy pool has not yet been initialized.
|
||||
If the
|
||||
.B GRND_NONBLOCK
|
||||
flag is set, then
|
||||
.BR getrandom ()
|
||||
instead immediately returns \-1 with
|
||||
does not block in these cases, but instead immediately returns \-1 with
|
||||
.I errno
|
||||
set to
|
||||
.BR EAGAIN .
|
||||
|
|
Loading…
Reference in New Issue