• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SIGPIPE with sockets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGPIPE with sockets


  • Subject: Re: SIGPIPE with sockets
  • From: Jeremy Pereira <email@hidden>
  • Date: Mon, 19 Jan 2009 12:17:00 +0000


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 (email@hidden)

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:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >SIGPIPE with sockets (From: malcom <email@hidden>)

  • Prev by Date: Re: Check URL Status
  • Next by Date: Re: Yo
  • Previous by thread: SIGPIPE with sockets
  • Next by thread: Re: SIGPIPE with sockets
  • Index(es):
    • Date
    • Thread