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

IO redirection problems in the debugger

From:
Michael Schroeder
Date:
November 28, 2005 14:34
Subject:
IO redirection problems in the debugger
Message ID:
20051128185434.GA20579@immd4.informatik.uni-erlangen.de

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)

Thanks,
  Michael.

-- 
Michael Schroeder           mlschroe@informatik.uni-erlangen.de
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}



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