3 ms·
Well that's interesting. There are two nearly identical keyboard mishaps that can wedge a screened process, and they both require ^Q to recover. I've always at
by bostik 11y ago
Well that's interesting. There are two nearly identical keyboard mishaps that can wedge a screened process, and they both require ^Q to recover.
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.
- smosher_ 11y ago^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.)
- jon-wood 11y agoIt's a nice theory, but I seem to remember ^B being Tmux's escape key because it was developed within a Screen session.
- tonyarkles 11y agoEither 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!)
- yuubi 11y ago^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).