Why doesn't ctrl+u send SIGKILL? stty says it should
Clash Royale CLAN TAG#URR8PPP
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
add a comment |
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
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.
– 炸鱼薯条德里克
Jan 11 at 0:53
Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key forSIGKILL
;-) Anyways, try^
; most programs don't bother to catchSIGQUIT
.
– mosvy
Jan 11 at 1:32
The questioner already named one such program.
– JdeBP
Jan 11 at 8:49
add a comment |
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
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
shell tty kill signals
asked Jan 10 at 23:51
spraffspraff
2161515
2161515
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.
– 炸鱼薯条德里克
Jan 11 at 0:53
Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key forSIGKILL
;-) Anyways, try^
; most programs don't bother to catchSIGQUIT
.
– mosvy
Jan 11 at 1:32
The questioner already named one such program.
– JdeBP
Jan 11 at 8:49
add a comment |
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.
– 炸鱼薯条德里克
Jan 11 at 0:53
Your confusion aside, I wonder what awful programs you have to run that much that you feel the need of a shortcut key forSIGKILL
;-) Anyways, try^
; most programs don't bother to catchSIGQUIT
.
– mosvy
Jan 11 at 1:32
The questioner already named one such program.
– JdeBP
Jan 11 at 8:49
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.– 炸鱼薯条德里克
Jan 11 at 0:53
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.– 炸鱼薯条德里克
Jan 11 at 0:53
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
Jan 11 at 1:32
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
Jan 11 at 1:32
The questioner already named one such program.
– JdeBP
Jan 11 at 8:49
The questioner already named one such program.
– JdeBP
Jan 11 at 8:49
add a comment |
1 Answer
1
active
oldest
votes
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.
Orman stty
:kill CHAR CHAR will erase the current line
– tink
Jan 11 at 0:25
1
"character assassination" ROTFL
– filbranden
Jan 11 at 0:31
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Orman stty
:kill CHAR CHAR will erase the current line
– tink
Jan 11 at 0:25
1
"character assassination" ROTFL
– filbranden
Jan 11 at 0:31
add a comment |
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.
Orman stty
:kill CHAR CHAR will erase the current line
– tink
Jan 11 at 0:25
1
"character assassination" ROTFL
– filbranden
Jan 11 at 0:31
add a comment |
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.
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.
edited Jan 11 at 0:33
answered Jan 11 at 0:20
thrigthrig
24.6k23056
24.6k23056
Orman stty
:kill CHAR CHAR will erase the current line
– tink
Jan 11 at 0:25
1
"character assassination" ROTFL
– filbranden
Jan 11 at 0:31
add a comment |
Orman stty
:kill CHAR CHAR will erase the current line
– tink
Jan 11 at 0:25
1
"character assassination" ROTFL
– filbranden
Jan 11 at 0:31
Or
man stty
: kill CHAR CHAR will erase the current line
– tink
Jan 11 at 0:25
Or
man stty
: kill CHAR CHAR will erase the current line
– tink
Jan 11 at 0:25
1
1
"character assassination" ROTFL
– filbranden
Jan 11 at 0:31
"character assassination" ROTFL
– filbranden
Jan 11 at 0:31
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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.– 炸鱼薯条德里克
Jan 11 at 0:53
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 catchSIGQUIT
.– mosvy
Jan 11 at 1:32
The questioner already named one such program.
– JdeBP
Jan 11 at 8:49