3 ms·
> In fact the second point is the sole difference between getrandom(2) and /dev/urandom. AFAIK, there's another important difference: getrandom(2) doesn't use
by cesarb 8y ago
> In fact the second point is the sole difference between getrandom(2) and /dev/urandom.
AFAIK, there's another important difference: getrandom(2) doesn't use a file descriptor (so it'll work even if you're out of file descriptors, or in other situations where having an open fd is inconvenient), and it doesn't need access to a /dev directory with the urandom device.