When getting a high volume of output from tmux, you can't send a C-c
By gnach... on March 23, 2012 15:48 (imported from Google Code)
From the mailing list:
When I attach to a tmux session, and something prints a lot of text, it is very hard to stop text output. (with ctrl-C)
I think what happens is this: If I just connect remotely with ssh, and print a lot, then the connection is fairly slow, and I can quickly press ctrl-C before too much text has arrived at my end.
With tmux, text is sent to the tmux session, whicih is right on the computer, so lots of text can be sent to the session. Then when I press ctrl-C, tmux is still sending all the text to iTerm2 to update the screen, and it seems my ctrl-C had to wait in line till all the text has been sent.
While this is happening, all other windows are also not very responsive, because lots of data is sent across.
Wile this is happening, I think I also can't close the window or detach...
If iTerm2 wasn't connected to the session at the time when all the text is sent, and then attaches afterwards, I think it would get only the last screen of data, not the full blast.
I'm not sure how one can solve this. Maybe one can send to tmux - stop updating this window? Or Maybe close this window?
I'm also not sure where the problem is. I just tried to print a lot of data, then go to tmux in another ssh and tell it to close the window, which it seems to have done. But output was still pouring in the iTerm2 window. It was probably still buffering either in iTerm2 or on the connection (?)...
Thanks!
Michael
P.S. there used to be a control code ctrl-o, which I've never seen implemented, which says - discard output to the terminal. That would be useful here....