This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dtrosset
Recipients
Date 2006-10-10.07:45:08
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Given the following code:

  import os
  child_stdin = os.popen("cat -", "w")
  old_stdout = os.dup(1)
  os.close(child_stdin.fileno())
  print "foo"
  os.dup2(old_stdout, 1)
  os.close(old_stdout)


I got these different results depending on the version
of python I am using. 


$ python2.4 -V 
Python 2.4.4c0
$ python2.4 test.py 
foo
close failed: [Errno 9] Bad file descriptor

$ python2.3 -V 
Python 2.3.5
$ python2.3 test/new/test.py 
foo

My .02$ guess is that underlying file descriptor of
child_stdin being closed, when trying to delete this
object, it tries again to close it.
History
Date User Action Args
2008-01-20 09:59:03adminlinkissue1574310 messages
2008-01-20 09:59:03admincreate