What is a Mach Service?

I've seen the term "Mach Service" used in many places. One such place being the man page for launchd.plist, another being xpc_connection_create_mach_service, yet I cannot find any documentation online explicitly defining what a Mach Service is. Closest thing I've found is the Mach Overview documentation, but that seems to be unrelated to "Mach Services" and closer to a more abstract umbrella term for a list of kernel primitives.

So what is a Mach Service and what is the Mach bootstrap namespace? What functionality is it capable of? What is its purpose within an Application Bundle?

Accepted Reply

I just wrote a bunch of info about this in XPC and App-to-App Communication.

You can also find a lot of background to this in Technote 2083 Daemons and Agents (that’s super old, so some details aren’t right, but the basics are still valid).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Replies

Mach is the name of an OS kernel, which is used among others in MacOS.

Read details here: https://en.wikipedia.org/wiki/Mach_(kernel)

  • So does that make "Mach Service" just any service launched by launchd then? Everything I find in sudo launchctl list would be considered a mach service?

Add a Comment

I just wrote a bunch of info about this in XPC and App-to-App Communication.

You can also find a lot of background to this in Technote 2083 Daemons and Agents (that’s super old, so some details aren’t right, but the basics are still valid).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"