getrandom.2: Rework GRND_RANDOM text

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-01-29 13:20:54 +01:00
parent 3426471b46
commit 0646abd614
1 changed files with 7 additions and 6 deletions

View File

@ -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 .