Why does this launch an infinite loop of new processes?

Andrew Berg bahamutzero8825 at gmail.com
Wed Dec 21 13:59:45 EST 2011


I am trying to understand the multiprocessing module, and I tried some
simple code:

import multiprocessing
def f():
	print('bla bla')
p = multiprocessing.Process(target=f)
p.start()
p.join()

And the result is a new process that spawns a new process that spawns a
new process ad infinitum until I log out and the OS forcefully
terminates all my user processes. I have no idea what is happening; I
expected it to just print the string and terminate.

-- 
CPython 3.2.2 | Windows NT 6.1.7601.17640 | Thunderbird 7.0



More information about the Python-list mailing list