[issue11380] "close failed in file object destructor" when "Broken pipe" happens on stdout

2012-02-13 Thread Jeremy Fishman
Jeremy Fishman added the comment: The behavior under question here is how the interpreter handles a broken pipe during shutdown. The following code behaves as expected when either (a) the process receives a SIGINT or (b) the output pipe is closed import sys try: while True: print

[issue11380] "close failed in file object destructor" when "Broken pipe" happens on stdout

2011-03-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: Have you tried this with 3.2 (or 3.1)? What behavior do you expect when pipe goes first? -- nosy: +terry.reedy ___ Python tracker ___ _

[issue11380] "close failed in file object destructor" when "Broken pipe" happens on stdout

2011-03-02 Thread ulidtko
New submission from ulidtko : The following script fails: from time import sleep try: while True: sleep(0.1) print "blah" except KeyboardInterrupt: pass when being launched with redirections like this: $ python test.py | tee /dev/null and the tee process gots killed *