|GETRANDOM(2)||System Calls Manual||GETRANDOM(2)|
getrandom — get
Standard C Library (libc, -lc)
buflen, unsigned int
fills buf with up to buflen
bytes of random data.
The flags argument may include zero or more of the following:
EAGAINinstead of blocking, if the random(4) device has not yet been seeded. By default,
getrandom() will block until the device is seeded.
- This flag does nothing on FreeBSD. /dev/random and /dev/urandom are identical.
If the random(4) device has been seeded, reads of up to 256 bytes will always return as many bytes as requested and will not be interrupted by signals.
Upon successful completion, the number of bytes which were actually read is returned. For requests larger than 256 bytes, this can be fewer bytes than were requested. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
getrandom() operation returns the
getentropy() is non-standard. It is
present in Linux.
getrandom() system call first appeared
in FreeBSD 12.0.
|February 24, 2018||Debian|