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.
Created attachment 1560852 [details] Patch to clear the eof condition
Thanks. Please file this upstream at https://savannah.gnu.org/projects/octave/ if you haven't already.
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.
octave-4.4.1-8.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-45235f0616
octave-4.2.2-7.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-6d83d177bf
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
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
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.
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.