[pypy-issue] [issue1442] reload(sys) closes stdout

Amaury Forgeot d Arc tracker at bugs.pypy.org
Tue Apr 9 14:25:38 CEST 2013


New submission from Amaury Forgeot d Arc <amauryfa at gmail.com>:

reload(sys) closes stdout on next gc.
The following script fails when output is redirected to a file:

import sys, gc
print "OK"
reload(sys)
gc.collect()
print "KO"


  File "/tmp/foo.py", line 5, in <module>
    print "KO"
IOError: [Errno 9] Bad file descriptor: '<fdopen>'

----------
messages: 5547
nosy: amaury, pypy-issue
priority: bug
status: unread
title: reload(sys) closes stdout

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1442>
________________________________________


More information about the pypy-issue mailing list