Main index | Section 2 | Options |
#include <sys/random.h>
The flags argument may include zero or more of the following:
‘GRND_NONBLOCK’ | Return EAGAIN instead of blocking, if the random(4) device has not yet been seeded. By default, getrandom() will block until the device is seeded. |
‘GRND_RANDOM’ | 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.
[EAGAIN] | |
The ‘GRND_NONBLOCK’ flag was set and the random(4) device was not yet seeded. | |
[EFAULT] | |
The buf parameter points to an invalid address. | |
[EINTR] | |
The sleep was interrupted by a signal. | |
[EINVAL] | |
An invalid flags was specified. | |
[EINVAL] | |
The requested buflen was larger than IOSIZE_MAX. | |
GETRANDOM (2) | February 24, 2018 |
Main index | Section 2 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Using Unix is the computing equivalent of listening only to music by David Cassidy | ” |
— Rob Pike |