Hallo Thorsten.

Thorsten Glaser <t...@mirbsd.de> wrote:
 |Steffen Nurpmeso dixit:
 |>just a note that i do use mksh, still, everywhere, but got in
 |>distress this Monday after it failed again to restore the terminal
 |>after ^Zuspension.  (That is, it fails quite often with a very
 |>usual use case of mine, git(1) log over $PAGER, but this Monday
 |
 |Hm, is that the problem that, when you press ^Z, you don’t
 |get a prompt and can’t really input?

It is written but can't be seen.  You can, just no line editing,
no ISIG (as shown in first message):

  :[1] + Stopped              git loca 
  echo du
[Typed only once]
  echo du
[Thus: cat(1) effect]
  du
  ?0[steffen@wales ]$ 

 |That still happens occasionally for me, very rare, maybe once
 |a month, and never reproducible :( but usually, when I then
 |press Enter, or at least fg Enter ^Z, things work again.

Yep.  Just RETURN once, the next prompt is then truly interactive
again.  Oh.  I thus seem to suffer a lot.  ^.^  But yes, just
RETURN once, all is fine again.

 |So this is some kind of race condition?

How could that be?  I don't know nothing of how mksh transports
the TSTP to the process group, or whether it does at all.  For now
i had just turned the tcset macro to print __FILE__/__LINE__, and
then instrumented all along the path with quite a lot of STD I/O
to get an idea what actually happens. 

 |Is there a part of the stopped processes (git, less, …?) still
 |running and doing things to the tty?

Don't think so.

 |That’s fun. Do note that edit.c also does termios stuff…

On a winter's day, that could even be fun, maybe ^.^.

 |>And, is it a problem with my terminal in the end.  But you seem to
 |>know about this particular problem, too.
 |
 |Which terminal is that? Also, how good can you reproduce the problem?

Last year or so it was rxvt and Apple Terminal, currently this is
Linux, over ssh.  For me and "man termios" i'd say 1-in-5 up to
1-in-3 of all ^Z tries end up like this.   

 |Just to isolate: if you can reproduce it, can you do that in a
 |clean/empty environment (i.e. no profile/mkshrc loaded, maybe as
 |in 'env -i PATH=$PATH ENV=/nonexistent mksh' (no ‘-l’)?

Interesting.  With PATH=/bin:/usr/bin add TERM=linux PAGER=less
and we're there again.  But even without, and thus a "not fully
functional" terminal, after a couple of tries (less than ten)
i see the ^Z, visually.

 |>Sorry, i really would rather have sent a patch instead!
 |
 |Thanks for these warm words, it’s always nice to have users

Oh, am an everyday one.  Well let's see what the future brings.
Ciao.

--steffen

Reply via email to