[launchd-dev] launchctl list anomaly when logged in as root user

Damien Sorresso dsorresso at apple.com
Sat Apr 11 08:22:17 PDT 2015


In general, I'd recommend using the new print subcommand for this kind of system administration-ish stuff. The semantics around the old commands (like load, unload, list, etc.) were highly context-dependent, and that led to tons of situations where people had perfectly reasonable expectations (such as Raunak's) about being able to query a job loaded in a certain session, but due to (mumble mumble Mach, POSIX, bootstraps, sockets), you'd get completely different behavior.

The new print subcommand requires you to specifically target sessions and jobs (now called domains and services) rather than trying to sniff out which one you mean based purely on context. And it prints way more information, such as where the service was loaded from on-disk (if it came from on-disk), much more detailed last exit status, and more.
-damien

On 11 Apr, 2015, at 04:33, Thomas Clement <tclementdev at gmail.com> wrote:
> hmm ok, on 10.10 you can try the following:
> 
> > launchctl print user/0/com.mycompany.myAgent
> 
> > launchctl print gui/0/com.mycompany.myAgent
> 
> 
> On 11 Apr 2015, at 13:20, Raunak Poddar <raunak.poddar at gmail.com <mailto:raunak.poddar at gmail.com>> wrote:
> 
>> $ launchctl -u root list
>> Unrecognized subcommand: -u
>> (On Mac OS X 10.10)
> 
> _______________________________________________
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/launchd-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/launchd-dev/attachments/20150411/ab30aed9/attachment-0001.html>


More information about the launchd-dev mailing list