Issue #10763: subprocess.communicate() closes stdout and stderr if both are
pipes (bug specific to Windows).

Improve also the unit test: write a portable unit test.
3 files changed