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

[ID 20010929.014] Term::Complete screws up -ixon

Thread Next
From:
Nicholas Clark
Date:
September 29, 2001 16:07
Subject:
[ID 20010929.014] Term::Complete screws up -ixon
Message ID:
20010930000705.E545@plum.flirble.org
This is a bug report for perl from nick@talking.bollo.cx,
generated with the help of perlbug 1.33 running under perl v5.7.2.


-----------------------------------------------------------------
[Please enter your report here]

Aaaaaaaaaaaaaaagh.
I've been trying to work out what's messing up my terminal. It turns out
that it's the addition of a test for Term::Complete.
Term::Complete::Compete doesn't perfectly restore my terminal. It turns
-ixon to ixon.
^S and ^Q become flow control. *not* what I started with

Raw xterm grab, which superficially looks like a lot of garbage:

nick@Bagpuss [t]$ stty -all
speed 9600 baud; rows 50; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -ixon -ixoff
-iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
nick@Bagpuss [t]$ perl5.6.1 -MTerm::Complete -e 'Complete "perl ", "rules"'
perl rules
nick@Bagpuss [t]$ stty -all
speed 9600 baud; rows 50; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke

First stty -all shows the state of my terminal
Then I run perl5.6.1 -MTerm::Complete -e 'Complete "perl ", "rules"'
Second stty -all shows the new state of my terminal

or more obviously:

nick@Bagpuss [t]$ stty -all | grep ixon | sed -e 's/.*\(.ixon\).*/\1/'
-ixon
nick@Bagpuss [t]$ perl5.6.1 -MTerm::Complete -e 'Complete "perl ", "rules"'
perl rules
nick@Bagpuss [t]$ stty -all | grep ixon | sed -e 's/.*\(.ixon\).*/\1/'
 ixon

only change is that -ixon has become ixon.
Baaah.

I'm not enough of a terminal wizard to know why the routines:
	    $tty_raw_noecho = "$stty raw -echo";
	    $tty_restore    = "$stty -raw echo";

don't do what they should, or whether a stty -all can be used instead to
capture terminal output and restore it perfectly (so sorry, no patch), but
I'd hope that something can be done to fix this irritating bug.
I like my forward search in bash, and I don't like no steenkin' test turning
it into "mysteriously-lock-up-my-terminal"
(you may set your terminal how you like. This is none of my business)

bug in 5.6.1 and more annoyingly in bleadperl.

Nicholas Clark

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=lib
    severity=low
---
This perlbug was built using Perl v5.7.2 - Sat Sep 15 14:10:21 BST 2001
It is being executed now by  Perl v5.7.2 - Sat Sep 15 17:02:46 BST 2001.

Site configuration information for perl v5.7.2:

Configured by nick at Sat Sep 15 17:02:46 BST 2001.

Summary of my perl5 (revision 5.0 version 7 subversion 2 patch 12025) configuration:
  Platform:
    osname=linux, osvers=2.4.5-rmk6, archname=armv4l-linux
    uname='linux bagpuss.unfortu.net 2.4.5-rmk6 #4 tue jun 19 23:26:57 bst 2001 armv4l unknown '
    config_args='-Doptimize=-O1 -Dusedevel -Ubincompat5005 -Uinstallusrbinperl -Dcf_email=nick@talking.bollo.cx -Dperladmin=nick@talking.bollo.cx -Dinc_version_list=  -Dinc_version_list_init=0 -Uuse64bitint -de'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O1',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.4 20010319 (Debian prerelease)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldbm -ldb -ldl -lm -lc -lcrypt -lutil
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
    libc=/lib/libc-2.2.3.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:
    DEVEL12022

---
@INC for perl v5.7.2:
    /usr/local/lib/perl5/5.7.2/armv4l-linux
    /usr/local/lib/perl5/5.7.2
    /usr/local/lib/perl5/site_perl/5.7.2/armv4l-linux
    /usr/local/lib/perl5/site_perl/5.7.2
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.7.2:
    HOME=/home/nick
    LANG (unset)
    LANGUAGE (unset)
    LC_CTYPE=en_GB.ISO-8859-1
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/nick/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/sbin:/usr/sbin:/usr/local/sbin
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Next


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