Ubuntu – Why does Ctrl+\ (backslash) not kill the process any more

process

For a while, Ctrl+\ worked like a charm. Now, it does not kill the process. In fact it does nothing.

An example how it does NOT work:

adi@ebi:~ $ sleep 10
^C

[exited with 130]
adi@ebi:~ $ sleep 10
^\^\^\^\^\^\^\^\^\^\^\ 
adi@ebi:~ $

Ctrl+C stops sleep as usual, but Ctrl+\ does not, but it should, right?

Best Answer

What Ctrl + \ does is send SIGQUIT to the foreground process. Some developers want to use SIG* events in a way that the user might not expect or is accustomed to. You didn't mention the program, but lets see my case with Ctrl + \ and mplayer:

AO: [pulse] 44100Hz 2ch floatle (4 bytes per sample)
Video: no video
Starting playback...
A:   1.7 (01.7) of 0.0 (unknown)  0.4% 
// here I press Ctrl + \

MPlayer interrupted by signal 3 in module: play_audio
A:   1.0 (00.9) of 0.0 (unknown)  0.4% 

Exiting... (Quit)

As you see, mplayer catch the signal, but don't exit immediately. If I had used Ctrl + C it would say "MPlayer interrupted by signal 2 in module: play_audio". What I'm trying to explain is that each program can interpret the signals the way they like, without caring for what it is supposed to do. You must review the documentation. Also, remember that SIGKILL or 9 should be resorted as last resource. You must check that the keystrokes are also sent to the process, the keymap is correct and your keyboard is connected.