getrandom.2: Note advantages of fact that getrandom() doesn't use file descriptors

Inspired by Nikos Mavrogiannopoulos's post at
http://nmav.gnutls.org/2016/10/random-generator-linux.html

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-11-10 21:24:35 +01:00
parent 2e1f8bfa17
commit c35966b125
1 changed files with 17 additions and 0 deletions

View File

@ -157,6 +157,23 @@ was introduced in version 3.17 of the Linux kernel.
.SH CONFORMING TO
This system call is Linux-specific.
.SH NOTES
Unlike
.IR /dev/random
and
.IR /dev/random ,
.BR getrandom ()
does not involve the use of pathnames or file descriptors.
Thus,
.BR getrandom ()
can be useful in cases where
.BR chroot (2)
makes
.I /dev
pathnames invisible,
and where an application (e.g., a daemon during start-up)
closes a file descriptor for one of these files
that was opened by a library.
.\"
.SS Maximum number of bytes returned
As of Linux 3.19 the following limits apply:
.IP * 3