Fixes issue2791: subprocess.Popen.communicate leaked a file descripton until
the last reference to the Popen instance was dropped.  Adding explicit
close() calls fixes it.

Candidate for backport to release25-maint.
2 files changed