Skip navigation

launchd ignores certain plist keys

3740 Views 15 Replies Latest reply: Nov 18, 2012 8:55 AM by bewst RSS
  • bewst Level 1 Level 1 (0 points)
    Currently Being Moderated
    Nov 18, 2012 8:55 AM (in response to twtwtw)

    twtwtw wrote:

     

    The problem isn't so much that the documentation is vague or incomplete, but that the people who wrote the docs are Apple software engineers who have a skewed understanding of what constitutes common knowledge and what needs to be explained.

    No, that's the cause of the problem.  The result is that the docs are vague and incomplete.

    For instance, at the very bottom of man launchd.plist you'll find this:

     

         ~/Library/LaunchAgents         Per-user agents provided by the user.

         /Library/LaunchAgents          Per-user agents provided by the adminis-

                                        trator.

         /Library/LaunchDaemons         System-wide daemons provided by the admin-

                                        istrator.

         /System/Library/LaunchAgents   Per-user agents provided by Mac OS X.

         /System/Library/LaunchDaemons  System-wide daemons provided by Mac OS X.

    Which tells us that LaunchAgents run as users and LaunchDaemons run as root.

    Disagreed.  Neither who the agents are "provided by" nor whether they are "per-user" or "System-wide" definitively implies anything at all about the UID that actually runs the jobs.

     

     

      Whoever wrote the man page apparently assumed that this was so obvious it only needed a footnote - go figure - but it is there.  Have you seen the technote on agents and daemons and the daemons and services programming guide?  A bit more low-level than you need, but possibly helpful for background info.

     

    Actually, no, I hadn't seen that first one.  At this point I'd appreciate Apple erring on the side of "more low-level than I need" 

     

    It seems as though launchd had some internal tweaking done in the 10.6 to 10.7 transition, maybe in the 10.8 as well.  I'll have to look at your benchtest more closely.  But I hope you see my point.

    Mostly.  It's easy to say, with 20/20 hindsight, that I was misusing the facilities of launchd.  I still maintain that (modulo that technote that I haven't read yet) Apple makes it pretty darned hard to figure out what misuse is.

1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.