develooper Front page | perl.perl5.porters | Postings from December 2016

[perl #113960] MSWin32/perl -de1 hang up

Thread Previous
James E Keenan via RT
December 31, 2016 02:43
[perl #113960] MSWin32/perl -de1 hang up
Message ID:
On Tue, 03 Jul 2012 09:12:15 GMT, wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.39 running under perl 5.16.0.
> -----------------------------------------------------------------
> [Please describe your issue here]
> I was running "perl -de1" to enter into the debugger and was
> unable to got it's prompt and cpu/memory usage were growing up.
> I finnaly found that a file c:\dev\tty was existing on my system
> (must be a mistake outside of perl).
> If I delete this file the debugger ran as expected.
> It is because in at line 1399 a test for '-e /dev/tty'
> doesn't care that '$^O eq MSWin32' and use '/dev/tty' it rather
> than 'con' for the $console.
> Thanks.

Let me see if I can correctly re-state this problem.

You invoked the perl debugger, whose source code is found in lib/  As of now (commit 8df022406424cfae8a958737434c9949fd7d1bdc), starting at line 1530 of that file, there is an if-elsif-else block where we try to determine what the console should be on various systems.  The first 'elsif' is:

 1540     elsif ( -e "/dev/tty" ) {
 1541         $console = "/dev/tty";
 1542     }

... which was triggered on your system because there accidentally existed a file c:\dev\tty thereon.   Consequently, we didn't reach the *second* 'elsif' block:

 1548     elsif ( $^O eq 'dos' or -e "con" or $^O eq 'MSWin32' ) {
 1549         $console = "con";
 1550     }

Is that a correct analysis?

Thank you very much.
James E Keenan (

via perlbug:  queue: perl5 status: new

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About