Date: | Tue, 21 Sep 2004 15:59:48 -0600 |
From: | "Wiggins d Anconia" <wiggins [...] danconia.org> |
To: | bug-POE [...] rt.cpan.org |
Subject: | Re: Term::ReadKey testers wanted (RedHat 9.0 on Athlon) |
I experience this issue, and have included the output of your second
snippet below. System is a mostly up2date RH9 system without all that
much tweaking.
I will do my best to provide any other info you need, and am fairly
system/POE oriented, though not C experienced.
http://danconia.org
Show quoted text
----- system -----
Linux francisco 2.4.20-31.9 #1 Tue Apr 13 17:38:16 EDT 2004 i686 athlon
i386 GNU/Linux
----- perl -----
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.4.21-1.1931.2.382.entsmp,
archname=i386-linux-thread-multi
uname='linux str'
config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686
-Dmyhostname=localhost -Dperladmin=root@lo
calhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr
-Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=
/usr -Dsiteprefix=/usr -Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib
-Dusethreads -Duseithreads -Duselargefi
les -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow
-Di_syslog -Dman3ext=3pm -Duseperlio -Dinst
allusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef'
useithreads=define usemultiplicity=
useperlio= d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=un uselongdouble=
usemymalloc=, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -I/usr/
local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-I/usr/include/gdbm',
optimize='',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -I/usr/local/incl
ude -I/usr/include/gdbm'
ccversion='', gccversion='3.2.2 20030222 (Red Hat Linux 3.2.2-5)',
gccosandvers=''
gccversion='3.2.2 200302'
intsize=r, longsize=r, ptrsize=5, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long'
k', ivsize=4'
ivtype='l, nvtype='double'
o_nonbl', nvsize=, Off_t='', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc'
l', ldflags =' -L/u'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libper
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so', d_dlsymun=undef, ccdlflags='-rdynamic
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-l
inux-thread-multi/CORE'
cccdlflags='-fPIC'
ccdlflags='-rdynamic -Wl,-rpath,/usr/lib/perl5', lddlflags='s
Unicode/Normalize XS/A'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Locally applied patches:
MAINT18379
Built under linux
Compiled at Aug 13 2003 11:47:58
%ENV:
PERL5LIB="/opt/httpd/domains/development/lib:/opt/httpd/domains/lib"
@INC:
/opt/httpd/domains/development/lib
/opt/httpd/domains/lib
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
.
----- stty before -----
speed 38400 baud; rows 64; columns 111; 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 = <undef>; 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 tab3 bs0
vt0 ff0
isig -icanon iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
-echoprt
echoctl echoke
----- stty inside -----
speed 38400 baud; rows 64; columns 111; 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 = <undef>; 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 tab3
bs0 vt0
ff0
-isig -icanon -iexten -echo -echoe -echok -echonl noflsh -xcase -tostop
-echoprt -echoctl -echoke
----- stty after -----
speed 38400 baud; rows 64; columns 111; 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 = <undef>; 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 tab3 bs0
vt0 ff0
isig -icanon iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop
-echoprt
echoctl echoke
----- done -----
> About a year ago there were reports of some RedHat Linux systems
> weren't working correctly with Term::ReadKey. Non-blocking ReadKey()
> would block, or it would spin its wheels or something. This problem
> makes POE::Wheel::ReadLine useless on some systems.
>
> One of POE 0.30's release goals is to resolve the Term::ReadKey issues
> in POE::Wheel::ReadLine. Nobody I've spoken to recently can reproduce
> the problem.
>
> If you'd like to help, please try this test case and let me know if it
> fails.
>
> #!/usr/bin/perl
>
> use Term::ReadKey;
>
> print "Press 'q' to quit this test.\n";
>
> ReadMode 5; # Turns off controls keys
>
> while (1) {
> while (not defined ($key = ReadKey(-1))) {
> print "Didn't get a key. Sleeping 1 second.\015\012";
> sleep (1);
> }
> print "Got key: $key\015\012";
> ($key eq 'q') and last;
> }
>
> ReadMode 0; # Reset tty mode before exiting
> exit;
>
> ...
>
> When you type into it, the test should display something like this:
>
> 1) poerbook:~/projects/support% perl term-readkey-nonblocking.perl
>
> Press 'q' to quit this test.
> Didn't get a key. Sleeping 1 second.
> Got key: t
> Didn't get a key. Sleeping 1 second.
> Got key: e
> Got key: s
> Got key: t
> Didn't get a key. Sleeping 1 second.
> Didn't get a key. Sleeping 1 second.
> Got key: q
>
> 1) poerbook:~/projects/support%
>
> It seems to fail most commonly by not registering keypresses. That
> is, you'll see a stream of "Didn't get a key." messages even when you
> type into the program. If this happens you may need to kill the
> program from another process.
>
> If the test case fails for you, please mail the output of the
> following program to bug-POE@rt.cpan.org. Please use a meaningful
> subject, and please include a valid return address if you'd like to
> assist further.
>
> #!/usr/bin/perl
> use warnings;
> use strict;
> use Term::ReadKey;
> print "----- system -----\n";
> system("uname", "-a");
> print "----- perl -----\n";
> system($^X, "-V");
> print "----- stty before -----\n";
> system("stty", "-a");
> print "----- stty inside -----\n";
> ReadMode 5;
> system("stty", "-a");
> ReadMode 0;
> print "----- stty after -----\n";
> system("stty", "-a");
> print "----- done -----\n";
> exit;
>
> Thank you.
>
> --
> Rocco Caputo - http://poe.perl.org/
>
>