Eryk Sun <eryk...@gmail.com> added the comment:

> It seems like self.stdout.read() hangs even after the child process 
> has been killed.

This is an issue when the standard handles are inherited or duplicated to a 
grandchild process, and so on. In the case of Popen(sys.executable), the system 
is duplicating the standard handles implicitly because sys.executable is a 
console process (assuming it's python[_d].exe), among other criteria. An 
additional reference on the write side prevents the pipe from closing. 
fh.read() in the grandparent won't return as long as there's a writer that 
could potentially write more data.

----------

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

Reply via email to