On 18 Aug 2016, at 17:58, James Bucanek <subscriber@gloaming.com> wrote:
Question: I now [have] a second system daemon (which I created to support XPC communications). This one is a bit special because its launchd properties include the <key>UserName</key> so the process is executes as the user that installed it.
OK, that statement is either incorrect or illustrates that we’re not using the same terminology. A *launchd daemon* is system wide. If you include the `UserName` property it’s started as that user; the only legitimate use case here is to supply a role account. If you don’t include the `UserName` property, the daemon runs as root.
A *launch agent* is per user. It runs as the user in whose context the agent was loaded. If you include the `UserName` property, it’s ignored.
Does that make sense? If so, is this “second system daemon” actually an agent?