[Top][All Lists]

[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 18:58:38 -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 #59, bug #55029 (project octave):

No, not a segfault, an EOF, as if I had typed Ctrl+D at the prompt and Octave
exits cleanly because it's done with stdin. If I enable
'__lexer_debug_flag__', I can see that the lexer receives EOF as soon as
'kbhit(1)' is executed. Again, this is only with --no-line-editing. Without
that option, 'kbhit(1)' just returns immediately and breaks normal 'kbhit()'
as explained earlier, probably because the EOF was seen on raw stdin by the
first 'kbhit(1)'.

This still looks to me to be related to the glibc 2.28 change that I quoted
back in comment #45, that once an EOF condition is seen on stdin, it persists
until the application explicitly clears the condition. When we read from
readline, this does not occur, possibly because readline is handling this
correctly and insulating Octave from this low-level behavior. But when kbhit
tries to read raw stdin, this bug is triggered.

It's helpful to know that this bug doesn't really have anything to do with
'pause' or with the interaction between 'pause' and processing graphics
events, but rather it's completely due to a problem with the non-blocking
'kbhit(1)' implementation and the behavior of file streams in glibc 2.28.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]