STINNER Victor <victor.stin...@haypocalc.com> added the comment:

save_fds should be moved outside the try block:

+            try:
+                # save a copy of the standard file descriptors
+                saved_fds = [os.dup(fd) for fd in range(3)]
+                ...
+            finally:
+                for std, saved in enumerate(saved_fds):
+                    os.dup2(saved, std)
+                    os.close(saved)


"temp_fds = [fd for fd, fname in temps]" should also be moved outside its try 
block.

Why not using .communicate() to write into stdin and read stdout/stderr?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12607>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to