Earlier quoted context omitted.
What are the advantages of a syscall in place of /dev/urandom?
Firstly: getentropy(2) is a /dev/random substitute, not urandom. You should call the process-context CSPRNG arc4random(3) in lieu of /dev/urandom. That should be in the standard library (and hopefully will be added). (It uses ChaCha20 nowadays, not RC4.) Secondly: It can fail with EINVAL (bad pointer) or EIO (>256 bytes requested), but does not fail even in a condition where file descriptors are exhausted. I don't kn…
Mind though that under the BSDs, there's no functional difference between /dev/random and /dev/urandom.