from multiprocessing.util import register_after_fork def dummy(obj): pass register_after_fork(dummy, dummy)