Bug 101546 - ReadKey(-1) is always undefined
Summary: ReadKey(-1) is always undefined
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl-TermReadKey
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Warren Togami
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-08-03 14:51 UTC by Jan Martinek
Modified: 2007-04-18 16:56 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-09-11 10:36:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Martinek 2003-08-03 14:51:38 UTC
Description of problem:

In "cbreak" mode, ReadKey(-1) should return a pressed key or undefined
if no key was pressed. But the return value is always undefined even
if a key is pressed.

Version: perl-TermReadKey-2.20-7

How reproducible:

Always

Steps to Reproduce:
1. The following program should terminate after pressing a key:

#!/usr/bin/perl -w
use Term::ReadKey;
ReadMode 3;
while (not defined (ReadKey(-1))) {}
    
Actual results:
The program makes an endless loop no matter which key is pressed.

Expected results:
The program should terminate after pressing a key

Comment 1 Chip Turner 2003-08-05 12:33:33 UTC
The script properly terminates for me with the perl in rawhide; do 'rpm -V perl'
and 'rpm -V perl-TermReadKey' report any modified files?

Comment 2 Warren Togami 2005-09-11 10:36:32 UTC
closing due to lack of response


Note You need to log in before you can comment on or make changes to this bug.