• 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
When to call signal(...)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: When to call signal(...)
      • From: email@hidden
  • Prev by Date: gcc 3.1 and c++ exception ?
  • Next by Date: Re: Datagram Socket Reading?
  • Previous by thread: Re: gcc 3.1 and c++ exception ?
  • Next by thread: Re: When to call signal(...)
  • Index(es):
    • Date
    • Thread