Closed josephlr closed 2 months ago
Left comment here just before this PR was created.
Sounds good! I'll put Solaris in its own file.
@newpavlov I moved Solaris stuff to its own file. I also changed the implementation to always set GRND_RANDOM
.
Looking over the man pages, I think your comment in https://github.com/rust-random/getrandom/pull/417#issuecomment-2095341300 (noting that all "correct" examples use GRND_RANDOM
) is a good point. I don't think it hugely matters one way or another, and if we are doing a special implementation for Solaris, we might as well just mimic what they recommend in their man pages.
Let me know if you want me to change it back to using flags = 0
for consistency with the other uses of getrandom(2)
.
https://github.com/rust-random/getrandom/pull/417 used
getentropy(2)
on Solaris, but after looking at the blog post introducinggetrandom()
andgetentropy()
, it seems like we should prefer usinggetrandom
based on this quote:I also updated some of the documentation explaining:
getentropy(2)
GRND_RANDOM
on SolarisGRND_RANDOM
on other platforms.