This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid POSIX::close when closing files by descriptor in IPC::Open3
Closing a file descriptor with POSIX::close bypasses PerlIO's ref-counting
of file descriptors and leads to MSVC++'s invalid parameter handler being
triggered when the PerlIO stream is closed later because that attempts to
close the underlying file descriptor again, but it's already closed.
So instead, we effectively fdopen() a new PerlIO stream and then close it
again to effect the closure of the file descriptor.