On Mon, Mar 18, 2013 at 10:36 AM, Erwin Namal <erwin.namal@gmail.com> wrote:
Sorry. I meant How do I handle SIGTERM?
From what I have read, I shall not call fork and exec from a daemon. But can I use GCD? I mean, can I have a serial dispatch queue in a daemon, or use one of those provided by the system?
Look at sigaction() or signal(), which allow you to specify a routine to run when you receive that signal. Note that whichever one you choose to use is generally mutually exclusive with the other, as you can only install a single routine per signal type. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.app... This email sent to site_archiver@lists.apple.com