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.
|
argument.
|
||||||
.TP
|
.TP
|
||||||
.B GRND_NONBLOCK
|
.B GRND_NONBLOCK
|
||||||
By default, if there are no random bytes available at all (when reading from
|
By default, when reading from
|
||||||
.IR /dev/random ),
|
.IR /dev/random ,
|
||||||
or the entropy pool has not yet been initialized (when reading from
|
|
||||||
.IR /dev/urandom ),
|
|
||||||
.BR getrandom ()
|
.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
|
If the
|
||||||
.B GRND_NONBLOCK
|
.B GRND_NONBLOCK
|
||||||
flag is set, then
|
flag is set, then
|
||||||
.BR getrandom ()
|
.BR getrandom ()
|
||||||
instead immediately returns \-1 with
|
does not block in these cases, but instead immediately returns \-1 with
|
||||||
.I errno
|
.I errno
|
||||||
set to
|
set to
|
||||||
.BR EAGAIN .
|
.BR EAGAIN .
|
||||||
|
|
Loading…
Reference in New Issue