[New-bugs-announce] [issue5313] multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()
Graham Dumpleton
report at bugs.python.org
Thu Feb 19 06:21:12 CET 2009
New submission from Graham Dumpleton <Graham.Dumpleton at gmail.com>:
In multiprocessing.process it contains the code:
def _bootstrap(self):
....
if sys.stdin is not None:
try:
os.close(sys.stdin.fileno())
except (OSError, ValueError):
pass
This code should probably be calling sys.stdin.close() and not
os.close(sys.stdin.fileno()).
The code as is will fail if sys.stdin had been replaced with an alternate
file like object, such as StringIO, which doesn't have a fileno() method.
----------
messages: 82457
nosy: grahamd, jnoller
severity: normal
status: open
title: multiprocessing.process using os.close(sys.stdin.fileno) instead of sys.stdin.close()
versions: Python 2.6, Python 3.0
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5313>
_______________________________________
More information about the New-bugs-announce
mailing list