3 ms·
So if I run a long running grep and terminate it using Ctrl+c, which remote host am I sending the command to?
by dingo_bat 8y ago
So if I run a long running grep and terminate it using Ctrl+c, which remote host am I sending the command to?
- icedchai 8y agoIt would be sent to whatever process is attached to the current pseudo terminal. (When I said "remote" I was more referring to the SSH scenario, but the mechanism is the same...)
- dingo_bat 8y agoOk, so that means the remote vs local logic doesn't apply. In fact none does. The demarcations are arbitrary. Cmd is randomly used and ctrl is randomly used. Even if there is a remote vs local rule, why not make ctrl do something for local programs? Do you use a separate keyboard for your ssh and another one for email? No. The keys switch contexts according to the active program.