Re: Blocking SIGPIPE.
Re: Blocking SIGPIPE.
- Subject: Re: Blocking SIGPIPE.
- From: Shawn Erickson <email@hidden>
- Date: Tue, 15 Sep 2009 13:48:47 -0700
On Tue, Sep 15, 2009 at 10:41 AM, Robert Bell
<email@hidden> wrote:
Hi all,
Does anyone know why blocking SIGPIPE would be an issue in some applications? With 10.6, a simple application as shown below can block SIGPIPE, however, when embedded in a larger app which is using sockets and a variety of other things, SIGPIPE is not blocking. I can block other signals (such as SIGINT) with no issue. The same code had no problem in 10.5.
Do you have a strong reason to have your sockets trigger a SIGPIPE in the first place? If not then when you create your sockets set them to not generate SIGPIPE but instead return EPIPE.
man setsockopt
---
SO_NOSIGPIPE is an option that prevents SIGPIPE from being raised when a write fails on a socket to which there is no reader; instead, the write to the socket returns with the error EPIPE when there is no reader.
---
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden