From owner-freebsd-current@FreeBSD.ORG Fri Oct 2 22:31:48 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E48B1065692 for ; Fri, 2 Oct 2009 22:31:48 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 5289C8FC2E for ; Fri, 2 Oct 2009 22:31:48 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id A7F5D1DD654; Sat, 3 Oct 2009 00:31:47 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 8A21B228CD; Sat, 3 Oct 2009 00:31:47 +0200 (CEST) Date: Sat, 3 Oct 2009 00:31:47 +0200 From: Jilles Tjoelker To: Justin Teller Message-ID: <20091002223147.GA26556@stack.nl> References: <20091001120730.GR3130@deviant.kiev.zoral.com.ua> <20091002201213.GA16633@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Kostik Belousov , freebsd-current@freebsd.org Subject: Re: Signals and an exiting thread X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2009 22:31:48 -0000 On Fri, Oct 02, 2009 at 03:08:17PM -0700, Justin Teller wrote: > However, we did a little more investigation, and the SIGKILL example > Jilles posted happens as well. We post a SIGKILL to a thread, and the > thread goes away before it can kill the process. If you mean pthread_kill() with "posting to a thread", then that does not seem a bug. I expect that pthread_kill() signals are lost when a thread exits and that pthread_kill() to a thread that has already terminated but has not yet been joined does nothing (possibly returning an error). If a SIGKILL from kill() is lost, that is a bug. -- Jilles Tjoelker