mirror of https://github.com/mkerrisk/man-pages
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:
parent
2e1f8bfa17
commit
c35966b125
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue