Launchd daemon
Launchd daemon
- Subject: Launchd daemon
- From: Erwin Namal <email@hidden>
- Date: Sun, 17 Mar 2013 21:59:40 +0100
Hello,
I have a large experience in developing cocoa applications, but none with launchd daemons. I would like to develop a system daemon running from start to shutdown and I know, from the documentation below [1] that there are a few requirements.
I have tried to compile the sampleD daemon, but it is way outdated and I can't make it work… despite setting it to 64bits and mountain lion.
So I have a few questions:
1. Which language can I use for my daemon? Obj-C? C? C++?
2. Is there a specific template to use? I saw an XPC service template in Xcode but that's all.
3. I know I need to handle SIGTERM, but I don't know how. Are there any other requirements?
4. I think that once launched, the daemon must have an infinite loop, right? ShouldI put a sleep() call inside? If yes, for how long?
These are pretty basic questions. I will gladly take any help, any sample code or any link towards documentations… in short amything is good to help me start.
Thanks,
Erwin
[1] https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html#//apple_ref/doc/uid/10000172i-SW7-BCIEDDBJ
_______________________________________________
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