Re: Launchd API documentation
Re: Launchd API documentation
- Subject: Re: Launchd API documentation
- From: Quinn <email@hidden>
- Date: Wed, 17 Oct 2007 10:01:20 +0100
At 12:49 -0700 16/10/07, Todd Heberlein wrote:
Is there *any* documentation for the launchd APIs?
Not yet. APIs at this level are typically documented in man pages,
and there is no <x-man-page://3/launch>. This is being tracked as
<rdar://problem/3886256>.
There is, however, reasonably good sample code showing how to create
a launchd-aware daemon (URL below), and there's more to come soon.
<http://developer.apple.com/samplecode/SampleD/index.html>
The reason I ask is that I wrote a simple network service written in
C++ that reads in input from cin, writes the information back out
cout, and appends the same information in a file. It makes no
assumptions about how it is started (i.e., via command line or as a
network service). Everything works fine.
It sounds like your service will be running in inetd-compatibility
mode (that is, you have the "inetdCompatibility" property in your
launchd property list), which means you shouldn't have to use the
APIs in "launch.h" at all.
BUT when I added a getauid() or setauid() to get/set Audit IDs I get
very strange results. I need to figure out if I am doing something
wrong by *not* calling the launchd APIs, or is there something wrong
with the audit APIs.
I don't think the API-level documentation you'd get from a "launch.h"
man page will help you with subtle problems like this. You might try
posting to the launchd-dev mailing list.
<http://lists.macosforge.org/mailman/listinfo/launchd-dev>
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden