[ANN] Another Signal Handling Example (uses mach messaging)
[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