Hello Thorsten,

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
i shortly hated it because of that.  (Passed that passage.))

So i think all in all about five hours i have instrumented the
code (note i said over and over again that Thorsten surely has
done that in the past already) and can assure you (i.e., too) that
any termios flag/setting and process group activity and code flow
in general is absolutely identical in between ^Z properly restores
the terminal, prints the prompt and allows canonical input ("with
ISIG"), and the other case.  I still suspect something about
process group handling and i guess TTOU relationship, because the
prompt will always be written and everything is fine, but in the
latter case you just won't see it.
As in

  SETPGID 20937 tcsetpgrgp
  TCGET with 0x1817610 (tty_state:0x63f2b0) jobs.c:1205
  2 now
  TCSET with 0x63f2b0 (tty_state:0x63f2b0) ISIG=1 jobs.c:1225
  TCSET  with 0x63f2b0 (tty_state:0x63f2b0) ISIG=1 jobs.c:920
  ^ZSHF PRINT TO FD 1 tty_fd 10 <>
  PUTTING NL
  SHF PRINT TO FD 2 tty_fd 10 <[1] + Stopped              git loca
  >
  [1] + Stopped              git loca
  SHF PRINT TO FD 2 tty_fd 10 <>
  mkraw fd 10 == tty_fd=10
  TCSET  with 0x7ffeb5e754d0 (tty_state:0x63f2b0) ISIG=0 main.c:1917
  SHF PRINT TO FD 2 tty_fd 10 <?0[steffen@wales mksh.git]$ >

Hier.

  ?0[steffen@wales mksh.git]$ SHF PRINT TO FD 2 tty_fd 10 <>
  ^G

Ok you see it but this is of course because the prints to stderr
bring it with them.  Interesting that the job status (e.g., [1]
+ Stopped              man termios) still gets through, but the
prompt thereafter isn't.
And, is it a problem with my terminal in the end.  But you seem to
know about this particular problem, too.
Sorry, i really would rather have sent a patch instead!
Ciao.

--steffen

Reply via email to