fumoboy007
fumoboy007

Reputation: 5543

com.apple.xpc.launchd.oneshot

In an XCTestCase test, I created a NSTask object and set it to run printenv. Then after the NSTask finished, I ran printenv using fork and execv. The output from both was identical except for one environment variable.

NSTask: XPC_SERVICE_NAME=com.apple.xpc.launchd.oneshot.0x10000004.Xcode

execv: XPC_SERVICE_NAME=0

What is com.apple.xpc.launchd.oneshot?

Upvotes: 3

Views: 2036

Answers (1)

TomsApple
TomsApple

Reputation: 21

I posted this same question on Apple Support Communities and the gentleman that wrote the program called EtreCheck replied.

I think you will find your answer here:

Hello TomsApple,

I guess now you know some of the reasons behind that big disclaimer that you saw when you ran EtreCheck.

The "com.apple.xpc.launchd.oneshot" is just a method that Apple uses to identify one of many categories of tasks that the system runs in the background. I don't know how much background you have in UNIX, so I don't know how much detail I should give you on this. In addition, Apple doesn't document any of this, so at some point my answer would move from fact to speculation.

I can tell you that I added that "Other apps" section to EtreCheck specifically to show some of the many different kinds of tasks that the operating system is launching and running in the background. Before, EtreCheck only looked at the 8 primary places to inject these background tasks into the operating system. I knew I was missing one of the paths for "login items" and wanted to capture that. I did manage to capture that information, but I also collected a whole lot more. I decided to keep them all in there, but hide the Apple tasks by default. Even so, this "Other apps" section show how much more complicated the operating system has become in the past few years. If you want, you can run EtreCheck so that it doesn't hide Apple tasks and doesn't hide known Apple failures. Just don't post that report here on Apple Support Communities. It is a crazy-long list of background tasks that are always running on your machine.

Now I know this doesn't really answer your question. If you want more specifics or more detail, I can provide it, but I can't necessarily guarantee its accuracy. I have attempted to use my Apple Developer Technical Support tickets to get more information about what some of these things are and Apple refuses to answer.

Upvotes: 2

Related Questions