(vm: &VirtualMachine)
| 762 | } |
| 763 | |
| 764 | fn py_os_before_fork(vm: &VirtualMachine) { |
| 765 | let before_forkers: Vec<PyObjectRef> = vm.state.before_forkers.lock().clone(); |
| 766 | // functions must be executed in reversed order as they are registered |
| 767 | // only for before_forkers, refer: test_register_at_fork in test_posix |
| 768 | |
| 769 | run_at_forkers(before_forkers, true, vm); |
| 770 | |
| 771 | #[cfg(feature = "threading")] |
| 772 | crate::stdlib::_imp::acquire_imp_lock_for_fork(); |
| 773 | |
| 774 | #[cfg(feature = "threading")] |
| 775 | vm.state.stop_the_world.stop_the_world(vm); |
| 776 | } |
| 777 | |
| 778 | fn py_os_after_fork_child(vm: &VirtualMachine) { |
| 779 | #[cfg(feature = "threading")] |
no test coverage detected