On Mac OS X 10.5, the launchd
you talk to as non-root user is not the same launchd
you talk to when root. So
$ launchctl list
$ sudo launchctl list
print out different lists, and the unprivileged `launchctl list
` contains processes that the root-`launchctl list
` does not know about. So running a launctl
command as root may cause it to fail.
I have never seen another UNIX-ish tool that would fail when run as root, but succeed otherwise.