[issue10174] multiprocessing expects sys.stdout to have a fileno/close method.

Mher Movsisyan report at bugs.python.org
Fri Jan 7 22:52:30 CET 2011


Mher Movsisyan <mher.movsisyan at gmail.com> added the comment:

The reported error is only reproducible in 2.6

Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import multiprocessing
>>> class A:pass
... 
>>> sys.stdin=A()
>>> p=multiprocessing.Pool(processes=2)
Process PoolWorker-1:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/process.py", line 223, in _bootstrap
Process PoolWorker-2:
Traceback (most recent call last):
    os.close(sys.stdin.fileno())
AttributeError: A instance has no attribute 'fileno'
>>>   File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/process.py", line 223, in _bootstrap
    os.close(sys.stdin.fileno())
AttributeError: A instance has no attribute 'fileno'

----------
nosy: +mher

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10174>
_______________________________________


More information about the Python-bugs-list mailing list