develooper Front page | perl.perl5.porters | Postings from September 2014

[perl #112382] perl5db.pl failed on Fedora 16 when debug scripts which executes fork() calls

From:
James E Keenan via RT
Date:
September 23, 2014 01:35
Subject:
[perl #112382] perl5db.pl failed on Fedora 16 when debug scripts which executes fork() calls
Message ID:
rt-4.0.18-22890-1411436125-1799.112382-15-0@perl.org
On Tue Apr 10 18:24:06 2012, xning@redhat.com wrote:
> This is a bug report for perl from xning@redhat.com,
> generated with the help of perlbug 1.39 running under perl 5.14.2.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
>  On Fedora 16, although environment variable 'TERM' has value 'xterm',
> xterm isn't
>  installed. So, when debug scripts which will execute fork(),
> perl5db.pl
> will fail
>  and quit when it executes the following codes, enters line 1493 ~
> 1500,
> because
> function xterm_get_fork_TTY need xterm program:
> 
> 1487 if (not defined &get_fork_TTY)
> 1488 {
> 1489     if ( defined $remoteport ) {
> 1490
> 1491         *get_fork_TTY = \&socket_get_fork_TTY;
> 1492     }
> 1493     elsif (defined $ENV{TERM}
> 1494
> 1495         and $ENV{TERM} eq 'xterm'
> 1496         and defined $ENV{DISPLAY}
> 1497       )
> 1498     {
> 1499         *get_fork_TTY = \&xterm_get_fork_TTY;
> 1500     }
> 1501     elsif ( $^O eq 'os2' ) {
> 1502         *get_fork_TTY = \&os2_get_fork_TTY;
> 1503     }
> 1504     elsif ( $^O eq 'darwin'
> 1505             and defined $ENV{TERM_PROGRAM}
> 1506             and $ENV{TERM_PROGRAM}
> 1507                 eq 'Apple_Terminal'
> 1508             )
> 1509     {
> 1510         *get_fork_TTY = \&macosx_get_fork_TTY;
> 1511     }
> 1512 } ## end if (not defined &get_fork_TTY...
> 
> I also think it's better for perl5db.pl to support *nix and linux
> current terminal emulation
> applications, so I make a patch. I have test the patch on gnome
> (ubuntu
> 10.04, Fedora 16),
> kde (opensuse 12), xfce (xubuntu 10.04.2), and lxde (mint 12). The
> patch
> works well.
> 
> The patch makes perl5db.pl support gnome-terminal, konsole,
> xfce4-terminal, terminal (xfce),
> lxterminal, and xterm in linux system. So, xterm becomes one of the
> terminal emulation
> applications supported in linux system, not the only one as before.
> 
> How to reproduce the problem? Rename xterm or move it to other
> directory, then debug a script that will execute fork() function.
> 

I reviewed this older ticket this evening.  It appears that the original poster first posted to the mailing list, attaching patches there.  However, when the issue was posted to rt.perl.org, the patches apparently didn't make it.

I am attaching two files, a .diff file and a .pl file.  I hope these correctly transcribe what the OP posted.

However, the patch was drawn against Perl 5.14's version of perl5db.pl, so it almost certainly will not apply in its current format.

Could I ask that those familiar with the debugger study the patch and advise us as to whether it's worth pursuing?  Then we can refine it to an applyable state.

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

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



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