Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 48317  / 3 Years ago, tue, september 28, 2021, 2:33:13

Ok,
I don't know why, but I've seen this question been asked many times, but none of the answers seem to be helpful, yet the problem is quite obvious, because I verified it on several computers.
Ctrl+C does NOT kill a running program in terminal (Ubuntu v10) even though it's supposed to. I wonder if anyone can actually point a solution that actually works.



So far I've tried Ctrl+, Ctrl+SysRq+K, and much more - nothing works!



The only thing that did work, sort of, is Ctrl+Z, but it doesn't actually kill/exit the program, but simply puts it in a background and then you still have to do kill %1 to actually kill it.



Thanks!


More From » 10.04

 Answers
3

Note: Answer andded after comments...



I'm pretty sure it will kill most terminal programs; of course, it won't kill the ones that fork a new process, then return the prompt immediately.



Some programs may catch this interrupt and handle it however they want, or even ignore it. It may depend a lot on whether the program is designed to be run in a terminal or from a GUI.



A few of the programs I just tried in 10.04 and 11.10 that will end are:



ping - which runs continuously by default, so this is the only way to stop it;
find - often takes a long time, so it's useful to be able to end it.
gedit

[#37623] Wednesday, September 29, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
irtuallyefu

Total Points: 429
Total Questions: 97
Total Answers: 119

Location: Hong Kong
Member since Tue, Oct 19, 2021
3 Years ago
irtuallyefu questions
;