Reply to topic

konsole: control-c not working

User avatar mehdus
Registered Member
Posts
3
Karma
0

konsole: control-c not working

Wed Aug 18, 2010 11:55 pm
Hello,
I've got this issue only lately: pressing control-c in konsole does not abort running command, it just prints ^C
I tried with a new profile but the problem persists, I never edited any konsole profile nor keyboard shortcuts.
xterm and any tty work normally. (in xterm it doesn't work when I launch it from konsole though)
I'm using Sidux 2010.01 kernel 2.6.34 and KDE 4.4.5
thank you for any help.
User avatar TheBlackCat
Registered Member
Posts
2945
Karma
8
OS

Re: konsole: control-c not working

Thu Aug 19, 2010 2:54 am
Does it not abort any running commands or does it only not abort specific ones?


Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965
User avatar mehdus
Registered Member
Posts
3
Karma
0

Re: konsole: control-c not working

Thu Aug 19, 2010 7:24 am
I've been testing it with some apps, control-c works with pidgin, chromium-browser and vlc but not with ping, wget, sleep, qcomicbook, avidemux, smplayer and many others.
looks confusing
john_hudson
Registered Member
Posts
549
Karma
2
OS

Re: konsole: control-c not working

Thu Aug 19, 2010 6:33 pm
You may find that the behaviour is application dependent. For example, it does abort mysql.


John Hudson, proud to be a member of KDE forums since 2008-Oct.
airdrik
Registered Member
Posts
1698
Karma
4
OS

Re: konsole: control-c not working

Thu Aug 19, 2010 9:02 pm
That behavior shouldn't be application-dependent, unless an application explicitly handles and ignores the SIGINT (airc) kernel signal (which is what konsole/bash should be sending whenever you hit ctrl+c).
One of his examples was ping which is a command line utility which by default runs forever until explicitly killed (by hitting ctrl+c in the terminal window where the ping process is running in the forground to send the kill signal to the process). If hitting ctrl+c doesn't kill ping (or any other long-running command-line utilities), that's a bug.


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar mehdus
Registered Member
Posts
3
Karma
0

Re: konsole: control-c not working

Thu Aug 19, 2010 9:28 pm
I think he was talking about the ones successfully handling ctrl+c keys, meaning those one are aborting manually.
airdrik
Registered Member
Posts
1698
Karma
4
OS

Re: konsole: control-c not working

Fri Aug 20, 2010 12:30 am
when you use ctrl+c to kill a process, the process doesn't receive the ctrl+c input and decide to or not to shut itself down. Instead, the terminal takes the input ctrl+c and sends the SIGINT (interrupt) kernel signal to the process, and unless the process explicitly intercepts the signal it is shut down by the kernel.
There are very few programs that intercept SIGINT - generally command prompts like bash which propagate the signal to the current foreground process, if any, or cancel whatever the current action is otherwise and bring you back to the command prompt (scripting language interactive shells behave similarly).

If for some reason hitting ctrl+c in konsole doesn't send the SIGINT signal, there's either a problem with your configuration or there's a bug.


airdrik, proud to be a member of KDE forums since 2008-Dec.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], DarkFoss1, Google [Bot], janpla, jeffgila, jmacleod, Majestic-12 [Bot], Mamarok, Snudl, Sogou [Bot], TechnoJunky, TheBeheader, voidfragment, wind_rose_2, Yahoo [Bot]