Martin Panter added the comment:

After understanding the Windows test failure in Issue 21619, I am starting to 
believe that code relying on a BrokenPipeError or EPIPE is flawed. It is an 
inherent unavoidable race condition with the receiving end of the pipe, as long 
as another thread or process is involved, which is always the case for the 
subprocess module. Another way of looking at it is that there is no guarantee 
that your data will have been (or will be) received, even if stdin.close() 
succeeds and does not raise EPIPE or similar. This is because piped data is 
buffered by the OS.

So the proposed change wouldn’t be a significant disadvantage, except for code 
that is already flawed. It is analogous to the argument used for ignoring 
EINTR, because depending on it for handling signals is inherently racy.

----------

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

Reply via email to