Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1705129 - Octave kbhit gets stuck at eof when called with an argument with glibc 2.28
Summary: Octave kbhit gets stuck at eof when called with an argument with glibc 2.28
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: octave
Version: 29
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL: https://savannah.gnu.org/bugs/?func=d...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-01 14:58 UTC by Chris Lesiak
Modified: 2019-05-17 03:17 UTC (History)
8 users (show)

Fixed In Version: octave-4.4.1-8.fc30 octave-4.2.2-7.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-17 01:04:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to clear the eof condition (573 bytes, patch)
2019-05-01 15:01 UTC, Chris Lesiak
no flags Details | Diff

Description Chris Lesiak 2019-05-01 14:58:11 UTC
User-Agent:       Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Build Identifier: 

Since glibc-2.28, all stdio functions now treat end-of-file as a sticky condition.  Octave's kbhit was not clearing this condition, so that once it sees eof (and it will when called with an argument indicating that it shouldn't wait for a keypress), it will always see eof even when a key is pressed.

Reproducible: Always

Steps to Reproduce:
1. Start octave in interactive mode
2. while 1 ; if kbhit(1) break; end ; end
3. press a key
Actual Results:  
The keypress does not break out of the loop

Expected Results:  
The keypress will break out of the loop

This bug will be fixed upstream in octave-5.2.0, but the bug is currently present in both Fedora 29 and 30.

Comment 1 Chris Lesiak 2019-05-01 15:01:11 UTC
Created attachment 1560852 [details]
Patch to clear the eof condition

Comment 2 Orion Poplawski 2019-05-01 17:23:30 UTC
Thanks.  Please file this upstream at https://savannah.gnu.org/projects/octave/ if you haven't already.

Comment 3 Chris Lesiak 2019-05-01 19:44:57 UTC
This was reported by others upstream.  I listed https://savannah.gnu.org/bugs/?func=detailitem&item_id=55029 as the URL, but should have made it more obvious in my comments.

Comment 4 Fedora Update System 2019-05-08 02:34:56 UTC
octave-4.4.1-8.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-45235f0616

Comment 5 Fedora Update System 2019-05-08 02:35:01 UTC
octave-4.2.2-7.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6d83d177bf

Comment 6 Fedora Update System 2019-05-09 02:18:07 UTC
octave-4.4.1-8.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-45235f0616

Comment 7 Fedora Update System 2019-05-09 04:14:17 UTC
octave-4.2.2-7.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6d83d177bf

Comment 8 Fedora Update System 2019-05-17 01:04:12 UTC
octave-4.4.1-8.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2019-05-17 03:17:07 UTC
octave-4.2.2-7.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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