[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0807121030260.2875@woody.linux-foundation.org>
Date: Sat, 12 Jul 2008 10:41:39 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andi Kleen <andi@...stfloor.org>
cc: Ingo Molnar <mingo@...e.hu>, Roland McGrath <roland@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Elias Oltmanns <eo@...ensachen.de>,
Török Edwin <edwintorok@...il.com>,
Arjan van de Ven <arjan@...radead.org>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists