Thank you for your replies. I just need some help to get started, after that I will be able to manage the development of the daemon.
I re-read the tech note and managed to compile sampleD.
From the tech note:
I have selected a launchd daemon that will handle: - The configuration of kexts. This does not need a GUI, but requires reading the configuration from a file, which the kext can't. - A database common to all users. The daemon will take care of thread-safe R/W access. - Communication will most probably be done with UNIX Domain Sockets. - I will need to configure the plist, which is very well explained (in an other documentation).
I have also taken a look at SampleD. - It gets their socket from launch_data_dict_lookup(sockets_dict, "MyListenerSocket"); Do I need to obtain a control socket from launchd or can I register it myself using ctl_register()?
Yes, this is where they explain all about the plists. It is very well documented, but doesn't answer my questions which are: - How to set up my project to use Objective-C for my daemon. - What does my Objective-C entry point look like (int main(…) ?) - How do I handle SIGKILL - If I can't use a for/while/etc. loop, how do I prevent my daemon from exiting once the main function returns? - Do I need to obtain a control socket from launchd or can I register it myself using ctl_register()?
Daemos are by definition command line. Do you know how to select objective-C as developing language?
Many thanks for your help. - E
|