Why doesn't ctrl+u send SIGKILL? stty says it should












2














I can interrupt a program by pressing ctrl+c in the shell. Often this kills the program but some programs trap the signal and keep running.



I want to be able to kill such programs more aggressively and did some research. I read that stty -a will list tty shortcuts. Here is the output:



speed 38400 baud; rows 27; columns 213; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc


Let me draw your attention to



intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; [...]


Two of those look familiar: ^C and ^D, and it looks like ^U should send sigkill, which I believe should be like kill -9.



In my particular case, I want to kill ddd, which is otherwise difficult to close sometimes. If I crtl+u from the shell, it has no effect, although kill -9 on its PID will kill it.



Am I wrong in interpreting this output from stty -a? Should ctrl+u send SIGKILL? Why didn't this work as expected? Or, how can I conveniently send SIGKILL from the shell (i.e. the shell which ddd was launched from)?










share|improve this question






















  • stty doesn't say it should, it just print the word "kill". I can print "I'm sick", but it can't tell you wether I'm really sick or not.
    – 炸鱼薯条德里克
    3 hours ago










  • Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key for SIGKILL ;-) Anyways, try ^ ; most programs don't bother to catch SIGQUIT.
    – mosvy
    2 hours ago


















2














I can interrupt a program by pressing ctrl+c in the shell. Often this kills the program but some programs trap the signal and keep running.



I want to be able to kill such programs more aggressively and did some research. I read that stty -a will list tty shortcuts. Here is the output:



speed 38400 baud; rows 27; columns 213; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc


Let me draw your attention to



intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; [...]


Two of those look familiar: ^C and ^D, and it looks like ^U should send sigkill, which I believe should be like kill -9.



In my particular case, I want to kill ddd, which is otherwise difficult to close sometimes. If I crtl+u from the shell, it has no effect, although kill -9 on its PID will kill it.



Am I wrong in interpreting this output from stty -a? Should ctrl+u send SIGKILL? Why didn't this work as expected? Or, how can I conveniently send SIGKILL from the shell (i.e. the shell which ddd was launched from)?










share|improve this question






















  • stty doesn't say it should, it just print the word "kill". I can print "I'm sick", but it can't tell you wether I'm really sick or not.
    – 炸鱼薯条德里克
    3 hours ago










  • Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key for SIGKILL ;-) Anyways, try ^ ; most programs don't bother to catch SIGQUIT.
    – mosvy
    2 hours ago
















2












2








2







I can interrupt a program by pressing ctrl+c in the shell. Often this kills the program but some programs trap the signal and keep running.



I want to be able to kill such programs more aggressively and did some research. I read that stty -a will list tty shortcuts. Here is the output:



speed 38400 baud; rows 27; columns 213; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc


Let me draw your attention to



intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; [...]


Two of those look familiar: ^C and ^D, and it looks like ^U should send sigkill, which I believe should be like kill -9.



In my particular case, I want to kill ddd, which is otherwise difficult to close sometimes. If I crtl+u from the shell, it has no effect, although kill -9 on its PID will kill it.



Am I wrong in interpreting this output from stty -a? Should ctrl+u send SIGKILL? Why didn't this work as expected? Or, how can I conveniently send SIGKILL from the shell (i.e. the shell which ddd was launched from)?










share|improve this question













I can interrupt a program by pressing ctrl+c in the shell. Often this kills the program but some programs trap the signal and keep running.



I want to be able to kill such programs more aggressively and did some research. I read that stty -a will list tty shortcuts. Here is the output:



speed 38400 baud; rows 27; columns 213; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc


Let me draw your attention to



intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; [...]


Two of those look familiar: ^C and ^D, and it looks like ^U should send sigkill, which I believe should be like kill -9.



In my particular case, I want to kill ddd, which is otherwise difficult to close sometimes. If I crtl+u from the shell, it has no effect, although kill -9 on its PID will kill it.



Am I wrong in interpreting this output from stty -a? Should ctrl+u send SIGKILL? Why didn't this work as expected? Or, how can I conveniently send SIGKILL from the shell (i.e. the shell which ddd was launched from)?







shell tty kill signals






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 4 hours ago









spraffspraff

2081515




2081515












  • stty doesn't say it should, it just print the word "kill". I can print "I'm sick", but it can't tell you wether I'm really sick or not.
    – 炸鱼薯条德里克
    3 hours ago










  • Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key for SIGKILL ;-) Anyways, try ^ ; most programs don't bother to catch SIGQUIT.
    – mosvy
    2 hours ago




















  • stty doesn't say it should, it just print the word "kill". I can print "I'm sick", but it can't tell you wether I'm really sick or not.
    – 炸鱼薯条德里克
    3 hours ago










  • Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key for SIGKILL ;-) Anyways, try ^ ; most programs don't bother to catch SIGQUIT.
    – mosvy
    2 hours ago


















stty doesn't say it should, it just print the word "kill". I can print "I'm sick", but it can't tell you wether I'm really sick or not.
– 炸鱼薯条德里克
3 hours ago




stty doesn't say it should, it just print the word "kill". I can print "I'm sick", but it can't tell you wether I'm really sick or not.
– 炸鱼薯条德里克
3 hours ago












Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key for SIGKILL ;-) Anyways, try ^ ; most programs don't bother to catch SIGQUIT.
– mosvy
2 hours ago






Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key for SIGKILL ;-) Anyways, try ^ ; most programs don't bother to catch SIGQUIT.
– mosvy
2 hours ago












1 Answer
1






active

oldest

votes


















4














That kill is for character assassination, not death by signal. It should be documented in a the termios(4) man page,




Erase and kill processing occur when either of two special characters,
the ERASE and KILL characters (see the Special Characters section), is
received. This processing affects data in the input queue that has not
yet been delimited by a newline NL, EOF, or EOL character. This undelimited data makes up the current line. The ERASE character deletes
the last character in the current line, if there is any. The KILL character deletes all data in the current line, if there is any.




or termios(3) on linux




VKILL (025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL).
This erases the input since the last EOF or beginning-of-line.
Recognized when ICANON is set, and then not passed as input.







share|improve this answer























  • Or man stty: kill CHAR CHAR will erase the current line
    – tink
    4 hours ago








  • 1




    "character assassination" ROTFL
    – filbranden
    3 hours ago











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493835%2fwhy-doesnt-ctrlu-send-sigkill-stty-says-it-should%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














That kill is for character assassination, not death by signal. It should be documented in a the termios(4) man page,




Erase and kill processing occur when either of two special characters,
the ERASE and KILL characters (see the Special Characters section), is
received. This processing affects data in the input queue that has not
yet been delimited by a newline NL, EOF, or EOL character. This undelimited data makes up the current line. The ERASE character deletes
the last character in the current line, if there is any. The KILL character deletes all data in the current line, if there is any.




or termios(3) on linux




VKILL (025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL).
This erases the input since the last EOF or beginning-of-line.
Recognized when ICANON is set, and then not passed as input.







share|improve this answer























  • Or man stty: kill CHAR CHAR will erase the current line
    – tink
    4 hours ago








  • 1




    "character assassination" ROTFL
    – filbranden
    3 hours ago
















4














That kill is for character assassination, not death by signal. It should be documented in a the termios(4) man page,




Erase and kill processing occur when either of two special characters,
the ERASE and KILL characters (see the Special Characters section), is
received. This processing affects data in the input queue that has not
yet been delimited by a newline NL, EOF, or EOL character. This undelimited data makes up the current line. The ERASE character deletes
the last character in the current line, if there is any. The KILL character deletes all data in the current line, if there is any.




or termios(3) on linux




VKILL (025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL).
This erases the input since the last EOF or beginning-of-line.
Recognized when ICANON is set, and then not passed as input.







share|improve this answer























  • Or man stty: kill CHAR CHAR will erase the current line
    – tink
    4 hours ago








  • 1




    "character assassination" ROTFL
    – filbranden
    3 hours ago














4












4








4






That kill is for character assassination, not death by signal. It should be documented in a the termios(4) man page,




Erase and kill processing occur when either of two special characters,
the ERASE and KILL characters (see the Special Characters section), is
received. This processing affects data in the input queue that has not
yet been delimited by a newline NL, EOF, or EOL character. This undelimited data makes up the current line. The ERASE character deletes
the last character in the current line, if there is any. The KILL character deletes all data in the current line, if there is any.




or termios(3) on linux




VKILL (025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL).
This erases the input since the last EOF or beginning-of-line.
Recognized when ICANON is set, and then not passed as input.







share|improve this answer














That kill is for character assassination, not death by signal. It should be documented in a the termios(4) man page,




Erase and kill processing occur when either of two special characters,
the ERASE and KILL characters (see the Special Characters section), is
received. This processing affects data in the input queue that has not
yet been delimited by a newline NL, EOF, or EOL character. This undelimited data makes up the current line. The ERASE character deletes
the last character in the current line, if there is any. The KILL character deletes all data in the current line, if there is any.




or termios(3) on linux




VKILL (025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character (KILL).
This erases the input since the last EOF or beginning-of-line.
Recognized when ICANON is set, and then not passed as input.








share|improve this answer














share|improve this answer



share|improve this answer








edited 3 hours ago

























answered 4 hours ago









thrigthrig

24.4k23056




24.4k23056












  • Or man stty: kill CHAR CHAR will erase the current line
    – tink
    4 hours ago








  • 1




    "character assassination" ROTFL
    – filbranden
    3 hours ago


















  • Or man stty: kill CHAR CHAR will erase the current line
    – tink
    4 hours ago








  • 1




    "character assassination" ROTFL
    – filbranden
    3 hours ago
















Or man stty: kill CHAR CHAR will erase the current line
– tink
4 hours ago






Or man stty: kill CHAR CHAR will erase the current line
– tink
4 hours ago






1




1




"character assassination" ROTFL
– filbranden
3 hours ago




"character assassination" ROTFL
– filbranden
3 hours ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f493835%2fwhy-doesnt-ctrlu-send-sigkill-stty-says-it-should%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

Refactoring coordinates for Minecraft Pi buildings written in Python