develooper Front page | perl.perl5.porters | Postings from November 2005

IO redirection problems in the debugger

Michael Schroeder
November 28, 2005 14:34
IO redirection problems in the debugger
Message ID:

Hi porters,

I've a problem with the interaction between Term-ReadLine-Gnu
and the perl debugger:

If I do

    $ perl -d -e 1
    DB<1> @x = (1..500)
    DB<2> |x @x

and quit the pager perl gets stuck in a segfault loop. The reason
for this is that the debugger code closes and reopens the OUT
descriptor, but it doesn't promote the new OUT to Term-ReadLine-Gnu.

A fix is to add

$term->Attribs()->{outstream} = *OUT if defined &Term::ReadLine::Gnu::readline;

to the places where out gets modified, but maybe you have a better
solution for this.

(perl-5.8.7, Term-ReadLine-Gnu-1.15)


Michael Schroeder 
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About