Ronald Oussoren added the comment:
In 3.8 the spawn method for multiprocessing changed from "fork" to "spawn" (see
https://docs.python.org/3/whatsnew/3.8.html#multiprocessing).
A side effect of this is that the module gets executed again in the child
processes (the same as on Windows).
The
New submission from Mustafa Quraish :
The code attached produces weird behaviour on macOS (Catalina at least) on
Python3.8 / Python3.9. Issue has been reproduced on at least one other mac
belonging to a friend. Does not occur on Linux as far as I have tested. I have
simplified the code as muc