IT lexicon › Infra & Ops › Mach port

Mach port

Infra & Ops På svenska → Updated: 2026-11-09

A kernel-protected message queue — the only way Mach tasks talk to each other, and to the kernel itself.

The kernel owns the queue. A process never touches it directly; it holds an integer name in its own namespace plus a set of rights. Exactly one holder gets the receive right and reads from the queue, while any number may hold a send right, or a send-once right that suits replies. Messages go out via mach_msg and can carry data, whole memory regions and fresh port rights, so a service can hand a client a private channel.

That makes ports capabilities: without a right you cannot even address the service. On macOS and iOS they still sit underneath XPC and launchd, with stubs generated by MIG. The downside shows up in the security record — whoever obtains a process's task port owns the process outright, and a long line of jailbreaks went exactly that way.

← Back to the lexicon