Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In a tmux session inside xterm when a programs generates lots of ouput (like a cat very_long_file the whole session in frozen for a while. Even if I press Ctrl-C nothing is interrupted. Presumably because tmux is frozen and it's not forwarding the Ctrl-C to the program generating the output. Is there any way to prevent this.

share|improve this question
The problem is that the program wrote its output to standard out far faster than your terminal could display it. When you hit Ctrl-C, the process is indeed killed, but your terminal continues to print the buffered output. –  chepner Apr 30 '12 at 21:16
add comment

4 Answers

up vote 6 down vote accepted

The correct solution is to look at the c0-* options to tmux to try and rate-limit the output. The reason this problem exists at all is due to data being sent to the terminal faster than it can display it, so rate-limiting is the only way.

share|improve this answer
c0-change-trigger and c0-change-interval seem to solve the problem. The default settings are enough for me. –  ecerulm May 2 '13 at 4:58
setw -g c0-change-interval 100 and setw -g c0-change-trigger 250 doesn't make any difference for me. I'm using tmux-1.8. Did I do something wrong? –  solotim Aug 20 '13 at 10:45
add comment

I still have this problem in tmux 1.6-2 on Ubuntu 12.10. One workaround that I've found is to detatch from the session (prefix+d) and then reattach (tmux attach, good candidate for a quick shell alias). It looks like tmux is actually responsive under the hood---you can confirm that your process is actually killed immediately with ctrl-c---it's just the drawing that's blocking. Detatch works immediately, and when you reattach, the drawing will have skipped to the end.

share|improve this answer
Good workaround. It seems that in fact everything works, even switching between splits, it just does not get drawn. –  jmiserez Oct 20 '13 at 12:51
This should be tmux attach, right? –  pandubear Mar 6 at 20:55
Oops, you're right. Fixed. –  Jack O'Connor Mar 7 at 21:11
And if you can't detach, e.g. not sure of the macro, just open a new terminal window and tmux attach. –  mahemoff Apr 4 at 22:51
add comment

As far as I know there is no way to prevent it in current releases but some work is ongoing. You can find some patches on tmux's mailing list http://thread.gmane.org/gmane.comp.terminal-emulators.tmux.user/2689.

A good keyword to search the web is "flow control".

share|improve this answer
why the patch is not validated in the main branch? this issue is the most important reason I still use gnu_screen. –  solotim Aug 15 '12 at 6:51
add comment

The answer http://superuser.com/a/589896/311481 works fine. I use the following values:

setw -g c0-change-trigger 10
setw -g c0-change-interval 250
share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.