Hi,I have a server (written in C++) that I'd like to port to a launchd service and I'm finding it difficult to navigate the macOS documentation. If I go to the developer docs search page and type in launchd I don't really get anything unless I check "Beta" in the filter. Is this an indication I should not be using launchd?If I look at the "beta" documentation here https://developer.apple.com/library/prerelease/content/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/Introduction.htmlIt leads me to this statementIf your daemon advertises a socket, check in withlaunchd as part of your daemon initialization. For an example implementation of the check-in process, see
SampleD.
This sounds exactly what I need to know as I'd like my service started on demand and it currently listens on a socket for clients.However when I take a look at that sample it first calls kqueue() which I cannot find any documentation for on the developer docs search page. There is a man page on my 10.11 machine. Then the sample calls a bunch of XPC calls (like launch_data_dict_lookup) that are all marked deprecated. If I shouldn't be calling those what are their replacements, their pages don't list any. Again this doesn't sound like an API I should be looking at for the future.Any suggestions on what I should read or use?- James
5
0
2.5k