-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
process.c: Add Process._fork #5017
Conversation
This API is supposed for application monitoring libraries to hook fork event. [Feature #17795]
...or a platform that has no fork https://github.com/mame/ruby/runs/3992670825?check_suite_focus=true ``` ../src/process.c:8731:54: error: 'rb_proc__fork' undeclared (first use in this function); did you mean 'rb_proc_dup'? 8731 | rb_define_singleton_method(rb_mProcess, "_fork", rb_proc__fork, 0); ```
Why not use something like tracepoint? |
That would be a lot of overhead for just catching forks. See https://github.com/rails/rails/blob/31ad3f152954142c68c030db596c35e31ca93a76/activesupport/lib/active_support/fork_tracker.rb for instance. |
Sorry for the terse reply, I didn't realise there was such discussion behind the issue already. I just spent some time to read it. I'll reply on the RBT issue. |
This API is supposed for application monitoring libraries to hook fork
event.
[Feature #17795]