Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add reinit for Crystal::System::Random on after_fork, fixed #5843 #5846

Closed
wants to merge 1 commit into from

Conversation

kostya
Copy link
Contributor

@kostya kostya commented Mar 20, 2018

now example in #5843 returns:

{0.11081753529688289, "ae96e22d-b69a-4951-9f56-3df4edbc7652"}
{0.7271770859230039, "0948319d-2078-466c-b1d4-6c91b7aad11a"}
{0.07958717249673676, "57da4980-08fd-4cf5-b52b-354c249e7926"}
{0.21592823632081862, "de0648c0-79f3-47cf-a416-ca8b069be32e"}
{0.6035845341814196, "1346b2f6-cf9f-4bfa-a97a-ea1fbcc3d659"}
{0.43879859033351215, "608396bd-710b-4342-81f9-9bff3fcaa975"}
{0.41325373119462844, "4b350ce6-8396-49cb-828b-b96c6b640b03"}
{0.20799528629624045, "7860057b-14f3-44f2-93c5-65ad2c83b81e"}
{0.19575174346064342, "a05276d1-06bd-4be5-833c-78c3c1b30569"}
{0.2045484056180609, "2019cf79-1512-4d89-952a-63887f925cf2"}

@RX14
Copy link
Contributor

RX14 commented Mar 20, 2018

I really don't like this fix. The fix should be to create an option not to do any read buffering at all, and use it. We should never buffer /dev/urandom

@kostya kostya closed this Mar 21, 2018
@kostya kostya deleted the fix_random_after_fork branch March 21, 2018 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants