Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Jun 2010 11:28:23 -0400 (EDT)
From:      Daniel Eischen <deischen@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>
Cc:        threads@freebsd.org, kib@freebsd.org
Subject:   Re: SIGPIPE and threads
Message-ID:  <Pine.GSO.4.64.1006281127380.7503@sea.ntplx.net>
In-Reply-To: <201006280833.54224.jhb@freebsd.org>
References:  <201006280833.54224.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.1006281127380.7503>