Re:It's all fun and games until someone [XOFF]
by jon-wood on Sunday June 21, 2015 @03:03AM
(#9752510)
It's a nice theory, but I seem to remember ^B being Tmux's escape key because it was developed within a Screen session.
Re:It's all fun and games until someone [XOFF]
by tonyarkles on Sunday June 21, 2015 @06:38PM
(#9755280)
Either way, ^A is supposed to be "go to the start of the line" and it drove me absolutely nuts when I was using screen and had to ^A^A. There was probably a way to remap that, but I was introduced to tmux via byobu and now just use straight tmux on everything (works great on OSX too!)
^S and ^Q don't send signals; they make the tty driver stop delivering output. If you ^S a process that's not generating output, it will continue to run until it generates some output (until it fills an output buffer? not sure; the original intent, to match a fast process with a slow output device, would be well served by buffering some output).
SIGSTOP is like SIGTSTP, the signal usually generated by ^Z, except (like SIGKILL, signal number 9) it's not possible to catch it. It makes the process stop doing anything at all until something sends SIGCONT (which shows up in ps output as state T).
Re:It's all fun and games until someone [XOFF]
by smosher_ on Sunday June 21, 2015 @02:14AM
(#9752409)
^A in bash will go to the beginning of the line. I don't know if this is why tmux changed the key, but it certainly makes a bigger difference to me because I use that function a lot. I rarely press ^S by accident (less often than I press it on purpose.)
I've always attributed these hangs to the sad fact that hitting ^A can fairly easily come off as "^A ^S", especially when you do the keyboard hit with a slightly rolling hand motion. And as that key combination means "send ^S to the process inside screen", it results the inner process receiving SIGSTOP. Of course, the recovery is nearly the same as in the article: ^A ^Q.
For a screen user both have the same cargo-cult solution - just send enough SIGCONTs to the screen to get the application responding again.
I suspect that tmux chose ^B as the default command key to prevent accidental process hangs.