Skip to content

Conversation

@nmggithub
Copy link

This new function able to resolve a ServiceTarget with only one message to launchd. I wasn't able to fully launch your app with my code changes to test them (as it requires a provisioning profile with the restricted Endpoint Security entitlement). However, I did briefly compare my version of fetchServiceTarget to one of the others, and it came up similarly.

I've kept the API design as close to yours as possible, as to cause as little disruption as possible.

The only thing my implementation is lacking is a string value of the service port. However, I don't think this really matters all that much as all that string value is is the integer value of the port in launchd's port name space. It doesn't provide much useful information as:

  1. It will be the string 0x0 if the service isn't running, and
  2. Like file descriptors, numerical representations of Mach ports are scoped to the process (or rather, in Mach's case, task). The number itself is of little use to another process/task.

If you are doing something I am unaware of with the port number string, I'm sorry that this method cannot work with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant