• 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
[ANN] Another Signal Handling Example (uses mach messaging)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ANN] Another Signal Handling Example (uses mach messaging)


  • Subject: [ANN] Another Signal Handling Example (uses mach messaging)
  • From: John Clayton <email@hidden>
  • Date: Tue, 23 Nov 2004 09:05:04 -0500

Hi,

I've been scouring the list these past few days to learn what I could about integrating signal handling into a Cocoa app. One of the suggestion is to use mach messaging. I took this example posted by Mike Laster:

http://www.cocoabuilder.com/archive/message/2003/2/4/5786

and worked it into a little Cocoa app:

http://www.fivesquaresoftware.com/code/MessagingSignalHandler.zip

It creates a single instance of MySignalHandler (and leaks it) which installs an NSMachPort as a run loop input source which handles mach messages by posting notifications. A signal handler is installed that just sends a mach msg via mach_msg_send to the mach port.

I don't know if there are any freaky things in here I did wrong, but I hope this helps some other folks looking around at one way to handle signals in their Cocoa apps.

//Best//J//

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: NSAttributedString attribues misbehaving
  • Next by Date: Re: USB Control Interface
  • Previous by thread: Re: NSAttributedString attribues misbehaving
  • Next by thread: Looking for example code to receive drop from ABPeoplePickerView
  • Index(es):
    • Date
    • Thread