Bug 101546 - ReadKey(-1) is always undefined
ReadKey(-1) is always undefined
Product: Red Hat Linux
Classification: Retired
Component: perl-TermReadKey (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Warren Togami
Depends On:
  Show dependency treegraph
Reported: 2003-08-03 10:51 EDT by Jan Martinek
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-11 06:36:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Martinek 2003-08-03 10:51:38 EDT
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:


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 08:33:33 EDT
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 06:36:32 EDT
closing due to lack of response

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