When to call signal(...)
When to call signal(...)
- Subject: When to call signal(...)
- From: Andrew Baldwin <email@hidden>
- Date: Fri, 10 May 2002 13:24:12 -0400
I am writing to a socket and once in a while I get a SIGPIPE signal. I
essentially want to be able to handle this in such a way that I can
disconnect the socket and raise a socket-not-connected type of cocoa
exception so that my cocoa code can handle it.
How do I write a C-function which can disconnect the socket (if that's
possible) and raise a cocoa exception? How do I pass the function to
"void (*signal(int sigcatch, void (*func)(int sigraised))) (int);" -- I
don't remember how to use function pointers.
And one last question -- when do I call signal(...): each time I'm about
to write to a socket, each time after I write to a socket, or once at
the beginning of the program?
Thanks for helping a newbie to all of this unix related stuff,
Andrew
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.