Pause on console in libmisc/shell detecting terminal size (mvme5500, beatnik)

Joel Sherrill joel at rtems.org
Fri Jan 5 01:01:52 UTC 2024


On Thu, Jan 4, 2024, 5:47 PM zhengxiaojun <17935334 at qq.com> wrote:

>
>
> 在 2024/1/5 4:25, Peter Dufault 写道:
> > I guess maybe the list went down for a while.  I sent this on 12-30, and
> just got a bounce message today and  no "devel" mail until today.
> >
> > On master when I type a shell command at the console there is a pause,
> rough timing:
> >
> > - Three second pause after hitting return;
> > - "0q" shows up on the console;
> > - Three second pause again, then the command is executed.
> >
> > This doesn't happen on a telnet session.  It is this commit:
> >
> > commit 8425e679c149096a5d0a97990f6ebdbdd55ca522
> > Author: Chris Johns <chrisj at rtems.org>
> > Date:   Tue Nov 22 21:05:48 2022 +1100
> >
> >     libmisc/shell: Support terminal size as env variables
> >
> >     Closes #4763
> >
> > Which has this:
> >
> >   fputs("\033[>0q", stdout);
> >
> > I backed it out for now.  Anyone else seeing this?
>

>
> I have the same issue, I stared a discussion on discord, but no further
> information.
>

I suspect a lot of people are just now coming back from the holidays. I
know I am just now digging out from being off since the 18th.

>
> Commit 7260887fa989c0141e7265cd851e00b4101410d8 "Work around tmux bug in
> row and column" introduced 150ms timeout(usleep(1000) 150 times). I
> tested On my board, the exact delay is about 300ms.  Timeout (in process
> shell command) will be called 3times, so the whole delay is about 1s.
>
> So maybe 150ms seems a bit long.
>
> But I found usleep() always sleep 1 more millisecond. usleep(1000)
> actual delay is about 2000us, usleep(1000000) actual delay is about
> 1001000us. rtems_task_wake_after() is exact.
>

Sounds like some math is arbitrarily adding a tick in the conversion to
ticks. It should just be a matter of following the code in a desk check and
checking the math. Could need a modulo to only add an extra tick when there
is a remainder.

>
> > Peter
> > -----------------
> > Peter Dufault
> > HD Associates, Inc.      Software and System Engineering
> >
> >
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20240104/789bbc06/attachment.htm>


More information about the devel mailing list