This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients palmer, sbt
Date 2012-09-11.15:26:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1347377204.88.0.766571265064.issue15914@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a reproduction without using multiprocessing:

create.py:

import threading, os

def foo():
    print("Trying import")
    import sys
    print("Import successful")

pid = os.fork()
if pid == 0:
    try:
        t = threading.Thread(target=foo)
        t.start()
        t.join()
    finally:
        os._exit(0)

os.waitpid(pid, 0)
print("create.py complete")


run.py:

import create
print("run.py complete")


Using python2.7 and python3.3 this works as expected, but with python3.2 I get

user@mint-vm /tmp $ python3 create.py
Trying import
Import successful
create.py complete
user@mint-vm /tmp $ python3 run.py 
Trying import
<Hang>
^CTraceback (most recent call last):
  File "run.py", line 1, in <module>
    import create
  File "/tmp/create.py", line 17, in <module>
    os.waitpid(pid, 0)
KeyboardInterrupt
History
Date User Action Args
2012-09-11 15:26:44sbtsetrecipients: + sbt, palmer
2012-09-11 15:26:44sbtsetmessageid: <1347377204.88.0.766571265064.issue15914@psf.upfronthosting.co.za>
2012-09-11 15:26:44sbtlinkissue15914 messages
2012-09-11 15:26:44sbtcreate