[issue1336] subprocess.Popen hangs when child writes to stderr

2011-10-31 Thread john doe

john doe tnagy1...@gmail.com added the comment:

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

--
nosy: +ita1024

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1336
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8728] 2.7 regression in httplib.py: AttributeError: 'NoneType' object has no attribute 'makefile'

2011-07-14 Thread John Doe

Changes by John Doe gainmax...@gmail.com:


--
nosy: +John.Doe

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8728
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com