Re: send on unconnected socket = crash (TCP sockets on X)
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.