Pause on console in libmisc/shell detecting terminal size (mvme5500, beatnik)
Chris Johns
chrisj at rtems.org
Fri Jan 12 01:52:55 UTC 2024
On 12/1/2024 12:59 am, Peter Dufault wrote:
>> On Jan 10, 2024, at 7:05 PM, Chris Johns <chrisj at rtems.org> wrote:
>>
>>> I changed the code to use VTIME of 1 (1/10 second, or 100 msec) instead of 0. That lets TERMIOS do the character arrival timeout instead of using a delay in a loop that resets - essentially duplicating VTIME != 0 VMIN == 0. Once I did that it times out as I expect in .1 seconds.
>>
>> Thanks for investigating this and finding a solution. Are you able to post a patch?
>>
>>> I don't know WHY no characters arrive but I know why it has a long delay.
>>
>> The 150msec timeout is needed when accessing remote devices on the other side of
>> the world but it should be 1/10 of a second and then the shall moves on. The
>> process is only done when the command prompt is painted so it should not
>> normally be noticeable.
>
> I can post a patch. Do I need to open a bug first?
No but maybe an "Update #???" referencing the original ticket?
>
> Only downside is VTIME needs to be multiples of .1 seconds, so it will be .1 or .2.
>
.1 should be fine. The original was 50msec and that was not fast enough in some
cases.
> The VTIME and VMIN is a good interface *except* that the VTIME>0 VMIN>0 case initial timeout is infinity. I don't like that, though I suppose an alarm and EINTR would let me do what I wish they had defined.
Sure, happy to see this area get improved.
Chris
More information about the devel
mailing list