Why does this launch an infinite loop of new processes?

Joshua Landau joshua.landau.ws at gmail.com
Wed Dec 21 14:07:31 EST 2011


On 21 December 2011 18:59, Andrew Berg <bahamutzero8825 at gmail.com> wrote:

> 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.


Eh? It works for me. Python 3.2 + 2.7
Is this the full code?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111221/1851db3e/attachment-0001.html>


More information about the Python-list mailing list