Bug 76071 - getkey seg-faults with no wait message, also needs to be able to ignore control characters
getkey seg-faults with no wait message, also needs to be able to ignore contr...
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.3
All Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
:
: 76070 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-16 11:43 EDT by Benjamin Delfin
Modified: 2014-03-16 22:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-01-14 00:07:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
source code fix, and enhancements (such as --help message) (3.47 KB, text/plain)
2002-10-16 11:45 EDT, Benjamin Delfin
no flags Details
Makefile for changed getkey (2.29 KB, text/plain)
2002-10-16 11:46 EDT, Benjamin Delfin
no flags Details
Improved source code file -- removed memory leak, restored allowing no keys to be specified, so that any key being hit can be captured, as was the case before. (3.42 KB, text/plain)
2002-10-16 14:13 EDT, Benjamin Delfin
no flags Details

  None (edit)
Description Benjamin Delfin 2002-10-16 11:43:42 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)

Description of problem:
When getkey is invoked with a wait period but no wait message, it core dumps.  
Also, there should be an option to allow getkey to ignore Control-C and Control-
D characters.  It's inability to avoid these characters can cause problems when 
dealing with the Linux Progress Patch.  When we used getkey to check for a 
keypress in order to reset a machine's environment and reboot, it would always 
do so when using the Linux Progress Patch, whether or not the key was actually 
pressed.  Finally, a NULL character passed to getkey will be interpreted as a 
successful match against it's list of characters.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Type "getkey -c 5 d" and wait.
	

Actual Results:  You get garbage characters, repeated 5 times, followed by a 
segmentation fault.

Expected Results:  It should have waited 5 seconds for the d key, then ended 
gracefully.

Additional info:
Comment 1 Benjamin Delfin 2002-10-16 11:45:39 EDT
Created attachment 80666 [details]
source code fix, and enhancements (such as --help message)
Comment 2 Benjamin Delfin 2002-10-16 11:46:24 EDT
Created attachment 80667 [details]
Makefile for changed getkey
Comment 3 Benjamin Delfin 2002-10-16 12:07:47 EDT
Also added popt library usage, to provide long aliases for options and help 
messages.  Made getkey fail if no list of characters is provided -- was that 
last change a good idea?  Maybe that last bit should be removed?
Comment 4 Benjamin Delfin 2002-10-16 14:13:03 EDT
Created attachment 80704 [details]
Improved source code file -- removed memory leak, restored allowing no keys to be specified, so that any key being hit can be captured, as was the case before.
Comment 5 Bill Nottingham 2002-11-12 00:55:44 EST
*** Bug 76070 has been marked as a duplicate of this bug. ***
Comment 6 Bill Nottingham 2003-01-14 00:07:25 EST
Added in 7.03-1, thanks!

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