From owner-freebsd-threads@FreeBSD.ORG Tue Nov 19 09:00:01 2013 Return-Path: Delivered-To: freebsd-threads@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8B8B709 for ; Tue, 19 Nov 2013 09:00:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A79BE2E3C for ; Tue, 19 Nov 2013 09:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rAJ901AE052459 for ; Tue, 19 Nov 2013 09:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rAJ901OB052457; Tue, 19 Nov 2013 09:00:01 GMT (envelope-from gnats) Date: Tue, 19 Nov 2013 09:00:01 GMT Message-Id: <201311190900.rAJ901OB052457@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org Cc: From: "Daniel M. Eischen" Subject: Re: threads/184073: wrong signal delivery to multithreaded processes in Perl X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list Reply-To: "Daniel M. Eischen" List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Nov 2013 09:00:01 -0000 The following reply was made to PR threads/184073; it has been noted by GNATS. From: "Daniel M. Eischen" To: bug-followup@FreeBSD.org, Thomas.Eckardt@thockar.com Cc: Subject: Re: threads/184073: wrong signal delivery to multithreaded processes in Perl Date: Tue, 19 Nov 2013 03:40:34 -0500 There is no guarantee in POSIX that the main thread receives a signal sent to the process if multiple threads (including the main thread) have the signal unblocked. The only way to guarantee signal delivery to a specific thread is to send it directly to the desired thread, have all threads other than the desired thread mask the signal, or be blocked in sigwait{info}() from the desired thread at the time of signal delivery. You are relying on behavior that is not specified by the standard.