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

Use unbuffered stdio for /dev/urandom to read exactly as much data as requested. #391

Merged
merged 1 commit into from
Dec 15, 2020
Merged

Use unbuffered stdio for /dev/urandom to read exactly as much data as requested. #391

merged 1 commit into from
Dec 15, 2020

Conversation

vburdo
Copy link
Contributor

@vburdo vburdo commented Dec 15, 2020

Buffered fread() reads 4096 bytes which is completely unnecessary and potentially may cause problems.
I discovered this on private linux configuration where custom /dev/urandom implementation has poor performance.

@bradh352 bradh352 merged commit 44fbc81 into c-ares:master Dec 15, 2020
sergepetrenko pushed a commit to tarantool/c-ares that referenced this pull request Jul 29, 2022
…ares#391)

Buffered fread() reads 4096 bytes which is completely unnecessary and potentially may cause problems.
I discovered this on private linux configuration where custom /dev/urandom implementation has poor performance.

Fix By: @vburdo
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