[issue5673] Add timeout option to subprocess.Popen

Reid Kleckner report at bugs.python.org
Thu Jan 6 23:13:41 CET 2011


Reid Kleckner <rnk at mit.edu> added the comment:

Pablo, so if I understand the issue you've run into correctly, you are using shell redirection to redirect stdout to a file, and then attempting to read from it using stdout=subprocess.PIPE.

It seems to me like this behavior is expected, because the shell will close it's current stdout file descriptor and open a new one pointing at "file".  When python tries to read from its end of the pipe, it complains that the fd has been closed.

I can avoid the problem here either by not reading stdout or by not redirecting to a file.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5673>
_______________________________________


More information about the Python-bugs-list mailing list