What happens on pressing Ctrl-T in a terminal when a program is running?

When I press Ctrl+T while some program is running in a terminal, I get some extra output, e.g.:

$ ping -q -c 100 google.com
PING google.com (172.217.16.46): 56 data bytes
load: 2.39  cmd: ping 5374 running 0.00u 0.00s
2/2 packets received (100.0%) 33.914 min / 34.169 avg / 34.423 max
...

Where does the output come from? Are there any other useful shortcuts that can be handled by a terminal?

Asked By: Eugene Yarmash

||

On some Unix-style systems (BSDs and macOS), CtrlT sends SIGINFO to the running process. Some commands handle this directly; otherwise, it’s handled by the kernel, and that’s what produces the output you’re seeing.

SIGINFO on GNU Linux (Arch Linux) missing has more on the topic.

Answered By: Stephen Kitt
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.