os: implement fork by yossi-k · Pull Request #2750 · RustPython/RustPython
This seems to work and tests pass (test_posix:test_register_at_fork).
I took a look at CPython's implementation and it seems they're doing more things before/after fork, namely acquiring the import lock, and re-initiating the interpreter in the child process (see here - https://github.com/python/cpython/blob/main/Modules/posixmodule.c#L593). Do we want to do the same thing here?