Spawning a process without main module Medium

Using the spawn or forkserver start method without importing the main module might lead to unexpected behavior (for example, it might cause a RuntimeError). Consider using if __name__ == '__main__' to safely import the main module and then run the function.

Detector ID
python/process-spawning-with-main-module@v1.0
Category
Common Weakness Enumeration (CWE) external icon
-