[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55029] pause() with no arguments does not ret
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28 |
Date: |
Thu, 28 Mar 2019 19:51:08 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36 |
Follow-up Comment #60, bug #55029 (project octave):
@Pantxo The following quick and dirty patch fixes this issue completely for
me.
--- a/libinterp/corefcn/sysdep.cc
+++ b/libinterp/corefcn/sysdep.cc
@@ -466,6 +466,7 @@ namespace octave
}
tcsetattr (tty_fd, wait ? TCSAFLUSH : TCSADRAIN, &s);
+ clearerr (stdin);
}
#elif defined (HAVE_TERMIO_H)
{
I haven't tried putting it at different places in the process, or trying to
see exactly where the EOF condition is triggered, but this particular call to
'clearerr' in the 'raw_mode' helper function fixes all problems for me.
Is this safe? Can we start from here and make something safer if needed?
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55029>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28, Mike Miller, 2019/03/27
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28, Pantxo Diribarne, 2019/03/28
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28, Mike Miller, 2019/03/28
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28, Rik, 2019/03/28
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28, Mike Miller, 2019/03/28
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28,
Mike Miller <=
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28, Rik, 2019/03/28
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28, Mike Miller, 2019/03/28
- [Octave-bug-tracker] [bug #55029] pause() with no arguments does not return like kbhit() with glibc 2.28, Pantxo Diribarne, 2019/03/29