On Thu May 07 09:02:04 2015, knut.arne.bjorndal@easyconnect.no wrote: > On 07/05/15 04:14, Tony Cook via RT wrote: > > On Wed May 06 04:03:02 2015, knut.arne.bjorndal@easyconnect.no wrote: > >> close STDOUT; > >> open( my $foo, ">&", \*STDOUT) or die $!; > >> > >> Expected result: die 'Bad file descriptor' > >> > >> What happened: A file named GLOB(0xe52b90) is created, and any output > >> written to $foo goes there. > >> > >> This has also been tested with 5.20.2 and 5.21.11 built with perlbrew. > > > > Try the attached patch. > > Seems to work fine. I've tested both some isolated examples of this > problem as well as a codebase that does a fair amount of IO redirection. > Thanks, I've attached a version with a test, which will go in once 5.22 is released. Tony --- via perlbug: queue: perl5 status: open https://rt.perl.org/Ticket/Display.html?id=125115