Message146685
The following piece of code does not seem to be thread-safe:
gc.disable()
try:
os.fork()
except:
...
If calling subprocess.Popen() is supposed to work from threads without any particular protection, then a lock is needed in subprocess.py:
try:
spawn_lock.acquire()
gc.disable()
try:
os.fork()
except:
...
finally:
spawn_lock.release()
Such issues are very difficult to reproduce and to track. The documentation should at least mention that calling gc.enable() may cause subprocess() to hang!
The following issue seems to be relevant: http://bugs.python.org/issue12739 |
|
Date |
User |
Action |
Args |
2011-10-31 10:22:44 | ita1024 | set | recipients:
+ ita1024, gvanrossum, loewis, gregory.p.smith, ggenellina, therve, jba |
2011-10-31 10:22:44 | ita1024 | set | messageid: <1320056564.29.0.110558034625.issue1336@psf.upfronthosting.co.za> |
2011-10-31 10:22:43 | ita1024 | link | issue1336 messages |
2011-10-31 10:22:43 | ita1024 | create | |
|