[launchd-dev] launchd check-in returns error 2 (ENOENT)

Brent Gulanowski bgulanowski at gmail.com
Fri Apr 23 07:59:15 PDT 2010


This is not urgent but I clearly don't understand something about launchd
check-in. We have a couple of daemons that are launched in response to a
socket connection.

Now, I'm going to straight-up guess that my problem is because I'm not
playing by the "rules" -- the daemon's are in inetd mode with Wait as NO. So
perhaps launchd just assumes the socket is no good to me and therefore
nothing else in the job's plist is of any use. Not sure why it would make
such an assumption, but I suppose it's because I can easily read the job
property list myself from the file system. Although since you can submit a
job directly without a property list file, it would be nice to access it
through check-in anyway, say, to read the name of the StandardErrorPath.

The daemon runs as a dedicated background user in the root launchd domain.
check-in returns NULL and errno was not 2 before calling launch_msg().

As an aside, when I run the daemon from Xcode, errno is 1 (EPERM), which
seems weird (what don't I have permission to do?).

It would be cool if someone would write a good book on launchd. It's so
awesome in so many ways, but it's just not getting the support it deserves.
It would also be nice if it had a full-featured Cocoa API.

-- 
#pragma mark signature
[[self mailClient] send:[Mail messageWithText:@"From: Brent Gulanowski\nTo:
You"];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20100423/50184b51/attachment.html>


More information about the launchd-dev mailing list