Re: How to loop until kill command sent?
Re: How to loop until kill command sent?
- Subject: Re: How to loop until kill command sent?
- From: Seth Pellegrino <email@hidden>
- Date: Tue, 17 Jul 2007 00:41:43 -0400
Hello,
I'm not a signal programming expert, but there's some good info here
(especially the "Catching Signals" section):
http://users.actcom.co.il/~choo/lupg/tutorials/signals/signals-
programming.html
Bear in mind that some signals cannot be caught. The (in)famous kill
-9 (SIGKILL) prevents the receiving process from getting any more CPU
cycles, period. In cases like that, I suppose you'd have to run a
watcher process to check if your main process terminated without
performing cleanup.
Hope that helps.
Seth
On Jul 17, 2007, at 12:05 AM, Devraj Mukherjee wrote:
Hi everyone,
I am trying to write a daemon style application in Objective-C. The
application listens to a socket for messages, and performs various
actions based on that.
I am using NSRunLoop to keep listening to the socket and respond to
the events using notifications. If the application is a sent a kill
signal I would like it to die gracefully.
1. How do I respond to kill signals sent to my application
2. Should I be using a threading model instead of the NSRunLoop
Thanks for your time
--
"I never look back darling, it distracts from the now", Edna Mode (The
Incredibles)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden