-
Notifications
You must be signed in to change notification settings - Fork 57
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
Blocking on /dev/urandom #310
Comments
so, there's fopencookie, which allows us to create our own FILE* stream defined with callbacks -- we could probably emulate urandom with that. However, i don't think that helps with the posix side of things. Perhaps we could emulate it with pipe/socketpair, since those give us fds? |
For posix functions, looking at fcntl man page, I can see two possibilities:
I feel the first solution is better. |
Implemented the first solution. |
Seen on Dead Cells, but other games will be affected. We need to hook when the game is reading into /dev/urandom, for now we create a file on memory and fill it with deterministic stuff (using system time so we can manipulate its content). However, /dev/urandom is supposed to be non-blocking, so we must feed enough bytes to the game, which is not the case for Dead Cells.
The text was updated successfully, but these errors were encountered: