-
Notifications
You must be signed in to change notification settings - Fork 13.3k
use pthread_atfork to make the runtime fork safe #9568
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
Comments
this would be excellent |
other approach would be to just have the runtime not start more than one thread, ever. This would be much saner actually, since user code that grabs locks is almost impossible to modify to make it fork safe. #9373 Obviously single-threaded everything isn't what is wanted in the general case where you do want to exploit multiple cores, but it would be nice to have the option for code that wants to use tradition daemon style fork-ing. |
what would the runtime do to be fork-safe? this seems very difficult. |
@brson: I'm not sure if it would be feasible, but in theory we can register handlers with The old system for handling daemons was for the end of the first child to signal that initialization was done, but this has been superseded by socket activation in |
I think the option of using |
rustc_tool_utils: bump version in anticipation of a new release cc rust-lang/rust-clippy#9553 After this is merged, I will publish the 0.2.1 version to crates.io, and make another PR that switches clippy to use the dependency from crates.io. The source can still be kept in the clippy repo though imo. This will allow miri and clippy to "share" the crate in the rustc repo once they both depend on it. reopen of rust-lang#9561 changelog: release `rustc_tools_util` on `Crates.io`.
jemalloc
already does this, so we don't have to worry aboutmalloc
andfree
.The text was updated successfully, but these errors were encountered: