MCPcopy Index your code
hub / github.com/RustPython/RustPython / run_at_forkers

Function run_at_forkers

crates/vm/src/stdlib/posix.rs:747–762  ·  view source on GitHub ↗
(mut funcs: Vec<PyObjectRef>, reversed: bool, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

745 }
746
747 fn run_at_forkers(mut funcs: Vec<PyObjectRef>, reversed: bool, vm: &VirtualMachine) {
748 if !funcs.is_empty() {
749 if reversed {
750 funcs.reverse();
751 }
752 for func in funcs {
753 if let Err(e) = func.call((), vm) {
754 let exit = e.fast_isinstance(vm.ctx.exceptions.system_exit);
755 vm.run_unraisable(e, Some("Exception ignored in".to_owned()), func);
756 if exit {
757 // Do nothing!
758 }
759 }
760 }
761 }
762 }
763
764 fn py_os_before_fork(vm: &VirtualMachine) {
765 let before_forkers: Vec<PyObjectRef> = vm.state.before_forkers.lock().clone();

Callers 3

py_os_before_forkFunction · 0.85
py_os_after_fork_childFunction · 0.85
py_os_after_fork_parentFunction · 0.85

Calls 7

fast_isinstanceMethod · 0.80
run_unraisableMethod · 0.80
SomeClass · 0.50
is_emptyMethod · 0.45
reverseMethod · 0.45
callMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected