SIGPIPE and threads
Daniel Eischen
deischen at freebsd.org
Mon Jun 28 15:28:25 UTC 2010
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
More information about the freebsd-threads
mailing list