Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755587AbXFMUUo (ORCPT ); Wed, 13 Jun 2007 16:20:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752373AbXFMUUh (ORCPT ); Wed, 13 Jun 2007 16:20:37 -0400 Received: from mx1.redhat.com ([66.187.233.31]:48639 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbXFMUUg (ORCPT ); Wed, 13 Jun 2007 16:20:36 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Satoru Takeuchi X-Fcc: ~/Mail/linus Cc: Linux Kernel , Linus Torvalds , Andrew Morton , Oleg Nesterov Subject: Re: [BUG] 2.6.22-rc4: wait4() waiting for SIGSTOP may not return if the target process is ptraced In-Reply-To: Satoru Takeuchi's message of Thursday, 7 June 2007 19:15:04 +0900 <87tztk9il3.wl%takeuchi_satoru@jp.fujitsu.com> Emacs: ballast for RAM. Message-Id: <20070613202028.803964D059F@magilla.localdomain> Date: Wed, 13 Jun 2007 13:20:28 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 837 Lines: 19 > > The bug is in strace (and is being fixed). It needs to use tgkill instead > > of kill to send that SIGSTOP to the right thread only. > > You mean kill() to specifig thread is fundamentally wrong? If so, current > kill() is wrong because it can receive pid of non main thread. The kill call should only be used on process IDs (tgid in linuspeak). This is what POSIX defines it for. I'm not sure off hand if it's technically a violation of POSIX that it works for numbers that aren't a POSIX process ID (aka tgid) but happen happen to be a Linux thread ID (aka pid). Thanks, Roland - 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/