Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754505AbYGLRnF (ORCPT ); Sat, 12 Jul 2008 13:43:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752502AbYGLRmz (ORCPT ); Sat, 12 Jul 2008 13:42:55 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:34119 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752573AbYGLRmy (ORCPT ); Sat, 12 Jul 2008 13:42:54 -0400 Date: Sat, 12 Jul 2008 10:41:39 -0700 (PDT) From: Linus Torvalds To: Andi Kleen cc: Ingo Molnar , Roland McGrath , Thomas Gleixner , Andrew Morton , linux-kernel@vger.kernel.org, Elias Oltmanns , =?ISO-8859-15?Q?T=F6r=F6k_Edwin?= , Arjan van de Ven Subject: Re: [PATCH] x86_64: fix delayed signals In-Reply-To: <87mykn2sos.fsf@basil.nowhere.org> Message-ID: References: <20080710215039.2A143154218@magilla.localdomain> <20080711054605.GA17851@elte.hu> <87mykn2sos.fsf@basil.nowhere.org> User-Agent: Alpine 1.10 (LFD 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1489 Lines: 39 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/