lkml.org 
[lkml]   [2008]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86_64: fix delayed signals


On Sat, 12 Jul 2008, Andi Kleen wrote:
>
> Linus, the fact that is not explained by your theory is why
> Ctrl-Z+kill works but Ctrl-C doesn't.

Umm. Read the reports more carefully. Many of the complaints are about ^Z
too.

More-over, ^Z and ^C are very different from an app standpoint. A _lot_ of
applications block or catch ^C (SIGINT), while doing the same for ^Z
(SIGTSTP) and SIGTERM is much less common (but possible: a tty sends
SIGTSTP, which is blockable, not SIGSTOP, which is not).

The reason? It's quite common to catch ^C in order to do cleanup. The
common handler case is that you catch SIGINT, do cleanup, and then kill
yourself with SIGINT in order to make it _look_ like you reacted directly
to the ^C.


So there are a _lot_ of loads where ^C will not kill things immediately,
but ^Z + SIGKILL (or SIGTERM, the default for "sig") will.

Try doing a "yum update", for example.

Or use 'git', for that matter. git does exactly that kind of thing:
catches SIGINT and removes temp-files etc. But if you kill it manually
using some "stronger" signal (and using ^Z to get the shell back before
you do that is obviously one way), that won't happen.

And trust me, git is not at all unusual in this respect.

Linus


\
 
 \ /
  Last update: 2008-07-12 19:45    [W:1.764 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site