On 19 Jan 2009, at 10:51, malcom wrote:

Hello guys,
I'm using blackhole netsocket class in an app of mine.
Today I've received a report regarding this error "....broken pipe
abnormal exit". I've taken a look a mailing list and it seems to be an
error related to sockets (cannot write, closed before write). Anyone
can tell me how to solve it? What mean cannot write? (or...why it
cannot write?).This is the only report since the beginning (over a
year ago); could it depend from some system settings?

A dev tell me that it just means the other side closed the connection
uncleanly (and it crashed). Is this a problem related to server? can I
fix it?

I don't know about "uncleanly", but yes, the reading end of the connection was closed and your program tried to write to it.

Your socket library is probably using either the write or the send system calls at the bottom level. According to the man page for write(2) (type "man 2 write" on a command line) says that the write call should return the EPIPE error. The man page for send(2) says the same, but also that SIGPIPE is generated (which will terminate the app).

If SIGPIPE is generated, you will need to install a signal handler to stop the app from crashing, or perhaps just ignore it. In this situation, the write/send system call may return EINTR instead of EPIPE.


Thanks a lot
malcom
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/adc%40jeremyp.net

This email sent to a...@jeremyp.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to