You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Run an escript that prodcues (slow) output, pipe it to less, and hit q to quit less. The tty is now in a bad state (e.g., with bash, prev history doesn't work). reset or stty sane is needed to fix it.
To Reproduce
Save the script below as test, make it executable and run test <name of a large text file> | less in bash. Hit q. Wait. When you get the bash prompt, try ctrl-p etc.
I dug into this and what happens is that when we try to be clever and restore the tty settings after the exit of Erlang we restore them to the values set by less... I'll see if I can add some bandaid, but it would seem like no matter what we do the shell will end up broken in some scenario.
garazdawi
added a commit
to garazdawi/otp
that referenced
this issue
Sep 9, 2024
If stdout is not a tty, then it might be a program that does its own
alterations of the tty which means that we should not touch it and
leave restoration to that program.
Closeserlang#8487
Describe the bug
Run an escript that prodcues (slow) output, pipe it to
less
, and hitq
to quit less. The tty is now in a bad state (e.g., with bash, prev history doesn't work).reset
orstty sane
is needed to fix it.To Reproduce
Save the script below as
test
, make it executable and runtest <name of a large text file> | less
in bash. Hitq
. Wait. When you get the bash prompt, try ctrl-p etc.Expected behavior
The tty should not be messed up. Also, it takes several seconds more than in 25 to get the prompt back.
Affected versions
I have tried 26.1.2 and 26.2.5.
The text was updated successfully, but these errors were encountered: