I do not quite understand what you are asking. You do not need to do anything so that it does not spawn infinitely many processes. I just ran it in Windows XP --- imported the file and ran multi.start() --- and it completed perfectly after a couple of seconds.
The reason you should protect if __name__=="__main__" is because on Windows, multiprocessing has to import the main script to run the target function, which means that the top-level module code in this file will be executed. The problem occurs only if the code of the top-level module itself tries to create a new process. In your example, the top-level module code does not use multiprocessing, so there is no endless chain of processes.
Edit: Now I get what you ask. You do not need to protect multi.py . You need to protect your main script, whatever that is. If you get a failure, it is because basically the script you do multi.start() in the code of the top-level module. Your script should look like this:
import multi if __name__=="__main__": multi.start()
"Protection" is always required in the main script.
source share