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

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

Thread Previous
From:
James E Keenan via RT
Date:
December 31, 2016 02:43
Subject:
[perl #113960] MSWin32/perl -de1 hang up
Message ID:
rt-4.0.24-3557-1483151616-1052.113960-15-0@perl.org
On Tue, 03 Jul 2012 09:12:15 GMT, xlat@cpan.org wrote:
> This is a bug report for perl from xlat@cpan.org,
> 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 perl5db.pl 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/perl5db.pl.  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 (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=113960

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About