From owner-freebsd-threads@FreeBSD.ORG Mon Jun 28 15:28:25 2010 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79CC61065674; Mon, 28 Jun 2010 15:28:25 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3919B8FC14; Mon, 28 Jun 2010 15:28:24 +0000 (UTC) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.4/8.14.4/NETPLEX) with ESMTP id o5SFSN0J001569; Mon, 28 Jun 2010 11:28:23 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.2.2 (mail.netplex.net [204.213.176.10]); Mon, 28 Jun 2010 11:28:23 -0400 (EDT) Date: Mon, 28 Jun 2010 11:28:23 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: John Baldwin In-Reply-To: <201006280833.54224.jhb@freebsd.org> Message-ID: References: <201006280833.54224.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: threads@freebsd.org, kib@freebsd.org Subject: Re: SIGPIPE and threads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2010 15:28:25 -0000 On Mon, 28 Jun 2010, John Baldwin wrote: > Currently when a thread performs a write(2) on a disconnected socket or a FIFO > with no readers the SIGPIPE signal is posted to the entire process via > psignal(). This means that the signal can be delivered to any thread in the > process. However, it seems more intuitive to me that SIGPIPE should be sent > to the "offending" thread similar to signals sent in response to traps via > trapsignal(). POSIX seems to require this in that the description of the > EPIPE error return value for write(2) and fflush(3) in the Open Group's online > manpages both say that SIGPIPE should be sent to the current thread in > addition to returning EPIPE: Yes, I believe SIGPIPE should be treated as a synchronous signal and sent to the offending thread. -- DE