On Thu, 31 Aug 2017 21:55:28 GMT, TODDR wrote: > This is a bug report for perl from toddr@cpan.org, > generated with the help of perlbug 1.40 running under perl 5.26.0. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > We just upgraded to 5.26.0 and noticed that an empty &STDERR file was > getting created in one of our directories. The root cause was hard to > track down because it only happened if /dev/tty was inaccessible. To > re-produce this (probably only on POSIX systems), you can do: > > perl526 -MPOSIX -MTerm::ReadLine -E'exit if(fork); POSIX::setsid(); > exit if(fork); my $t = Term::ReadLine->new("whatever")'; > > then > > ls -ld \&STDERR > > This problem bisects back to a conversion of a 2 arg open to a 3 arg > open in 1ae6ead94905dfee43773cf3b18949c91b33f9d1 > > The problem is that redirecting file handles to STDERR (open (my $fh, > ">&STDERR)) cannot be done as a 3 arg open or it'll actually try to > write to that file. > > I suggest reverting the fix (Only for the one file > dist/Term-ReadLine/lib/Term/ReadLine.pm) and also propose this be a > maintenance fix in 5.26.1 > > Todd > Patch attached; also available in the smoke-me/jkeenan/132008-term-readline branch. But I don't consider it ready to apply to blead as it lacks a test. Todd: Can you add a test for the non-creation of '&STDERR' that fails in blead (or 5.26) but passes once patch is applied? Thank you very much. -- James E Keenan (jkeenan@cpan.org) --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=132008Thread Next