Register callables to be executed when a new child process is forked using os.fork() or similar process cloning APIs. The parameters are optional and keyword-only. Each specifies a different call point.
os.register_at_fork(*, before=None, after_in_parent=None, after_in_child=None)