-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Don't use vfork on android #118085
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
Don't use vfork on android #118085
Conversation
When we start the child process, we clear all signal handlers. This operations ends up clearing the signal handlers also for the parent process. Revert to just using fork for simplicity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a signal handling issue on Android by reverting from vfork()
to fork()
for process creation. The issue occurs because Android's vfork()
implementation shares signal handlers between parent and child processes, causing the parent's signal handlers to be incorrectly cleared when the child process resets its handlers during startup.
Key Changes:
- Excludes Android from using
vfork()
in process creation - Updates comments to explain the Android-specific signal handling issue
- Maintains existing exclusions for Apple platforms
cc @janvorli |
/ba-g wasm failures unrelated |
I think this could be a candidate for backport to net9 |
/backport to release/9.0-staging |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/16721026186 |
When we start the child process, we clear all signal handlers. When using vfork, on Android, this operation ends up clearing the signal handlers also for the parent process. Revert to just using fork for simplicity.
vfork usage was added back in dotnet/corefx#33289, seems like there were some potential concerns then.
Legacy Xamarin was using fork.
Fixes #97209.