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

Fix getrandom FFI signature and usage on Linux. #9

Merged
merged 1 commit into from
Jan 31, 2023
Merged

Conversation

jemc
Copy link
Contributor

@jemc jemc commented Jan 31, 2023

The prior usage and FFI signature were wrong.
Not sure how that code was ever working...

The prior usage and FFI signature were wrong.
Not sure how that code was ever working...
@jemc jemc self-assigned this Jan 31, 2023
@jemc
Copy link
Contributor Author

jemc commented Jan 31, 2023

The signature was wrong, causing failures (returning -1, resulting in an infinite loop). Note that unless getrandom is invoked with the non-blocking flag, there is no need to loop. That's why the loop was removed.

@jemc jemc merged commit f3b4c29 into main Jan 31, 2023
@jemc jemc deleted the fix/linux-getrandom branch January 31, 2023 19:12
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.

1 participant