Message170314
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 |
|
Date |
User |
Action |
Args |
2012-09-11 15:26:44 | sbt | set | recipients:
+ sbt, palmer |
2012-09-11 15:26:44 | sbt | set | messageid: <1347377204.88.0.766571265064.issue15914@psf.upfronthosting.co.za> |
2012-09-11 15:26:44 | sbt | link | issue15914 messages |
2012-09-11 15:26:44 | sbt | create | |
|