When there is output in a terminal in background, the task eventually stops
I multi-task quite a bit, so I will often do something like
- start some long-running (on the order of minutes) task in a terminal
- then tab to a different terminal or a different application and do something else
This lets me effectively use the time it takes to complete the task, rather than just staring at my computer while it does things.
However, it seems that when the task produces output, then it will eventually stop running. I am not entirely sure what happens, but I've now seen this with different applications, though both of them use some sort of "fancy" terminal features to update the output in-place rather than scrolling up:
- I am running a test suite, which shows a fancy progress bar also indicating which tests are currently being run. When that happens in the background, it stops somewhere mid-way through, and only continues when I switch to that tab again.
- I am building a Rust program, and the Rust build system (
cargo
) will shows which crates it is currently building. I started a build in the background and then came back 20 minutes later, only to be quite surprised by the fact that the build was not done yet. The build resumed when I activated the terminal, and then it was quickly finished.
It seems like the terminal will stop processing the output that comes from the application, and then eventually the buffer is full and the application blocks.
I don't even know if this is a bug or a feature request. I consider it a bug, but YMMV. :) Strangely, I don't remember seeing this in the past, it only started happening after the most recent apt full-upgrade
a few days ago.
I am using Gnome Terminal Version 3.51.90 on Debian testing. I did not see this behavior with version 3.50, and I think I would have noticed this earlier -- so I assume that something changed in version 3.51.