(vm: &VirtualMachine)
| 5001 | /// after `fork()`, before any other thread is created. |
| 5002 | #[cfg(all(unix, feature = "threading"))] |
| 5003 | pub unsafe fn reinit_std_streams_after_fork(vm: &VirtualMachine) { |
| 5004 | for name in ["stdin", "stdout", "stderr"] { |
| 5005 | let Ok(stream) = vm.sys_module.get_attr(name, vm) else { |
| 5006 | continue; |
| 5007 | }; |
| 5008 | reinit_io_locks(&stream); |
| 5009 | } |
| 5010 | } |
| 5011 | |
| 5012 | #[cfg(all(unix, feature = "threading"))] |
| 5013 | fn reinit_io_locks(obj: &PyObject) { |
no test coverage detected