• 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: send on unconnected socket = crash (TCP sockets on X)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: send on unconnected socket = crash (TCP sockets on X)


  • Subject: Re: send on unconnected socket = crash (TCP sockets on X)
  • From: Matt Slot <email@hidden>
  • Date: Tue, 9 Jul 2002 18:34:39 -0400

email@hidden (email@hidden) wrote:
>send() would return -1 and I'd
>look at errno to find that the socket isn't connected.
>
>What actually happens is that the application crashes inside the send()
>call. CodeWarrior's debugger reports a non-helpful reason, something
>like "an unknown exception occurred". I would have thought the only
>thing I could do wrong to get send() to crash would be to pass it a bad
>buffer pointer or buffer length so it accesses a memory location it
>shouldn't, but that's not what's happening.

Your application is probably getting the following signal (from
/usr/include/sys/signal.h):

#define SIGPIPE 13 /* write on a pipe with no one to read it */

Unless you override the default signal handler, this will terminate your
application.

Matt

/* Matt Slot, Bitwise Operator * <http://www.ambrosiasw.com/~fprefect/> */
/* "I never let schooling interfere with my education." -- Mark Twain */
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.

References: 
 >send on unconnected socket = crash (TCP sockets on X) (From: email@hidden)

  • Prev by Date: send on unconnected socket = crash (TCP sockets on X)
  • Next by Date: More CF HTTP streams (Re: CFReadStreamGetBuffer doesn't work for HTTP streams?)
  • Previous by thread: send on unconnected socket = crash (TCP sockets on X)
  • Next by thread: More CF HTTP streams (Re: CFReadStreamGetBuffer doesn't work for HTTP streams?)
  • Index(es):
    • Date
    • Thread