Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@DzmitryKN
Copy link
Contributor

@DzmitryKN DzmitryKN commented Apr 7, 2023

open() may fail if process receives signal and open() requires blocked IO wait, like in case FS structures needed to open file are not cached at that moment. Proper way to handle such situation is to repeat operation if errno == EINTR.
Note that there're cases when Mono doing this correctly, like here: https://github.com/mono/mono/blob/main/mono/metadata/w32file-unix.c#L285 but its not doing this in the PE-loader's open(), that happen to fail sporadically with such error in our case. So this PR adds looping while (errno == EINTR) in this and similar places.

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