Re: Launchd daemon
Re: Launchd daemon
- Subject: Re: Launchd daemon
- From: Tilghman Lesher <email@hidden>
- Date: Mon, 18 Mar 2013 10:46:55 -0500
On Mon, Mar 18, 2013 at 10:36 AM, Erwin Namal <email@hidden> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden