mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
mac: Update comment describing using Mach receive rights with kqueue()
The prohibition on using Mach receive rights with kqueue() was lifted in 10.12. Add the source code reference that should have been here all along, and explain how xnu has changed. When the minimum runtime target is 10.12 or later, the port set in this code will be unnecessary, and it will be possible to remove it. Change-Id: I8fdf91a124efb081e4748ccf60680b12a38c4d18 Reviewed-on: https://chromium-review.googlesource.com/c/1406894 Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
dc6dee855e
commit
eb3f371879
@ -126,8 +126,12 @@ mach_port_t ChildPortHandshakeServer::RunServer(
|
||||
return MACH_PORT_NULL;
|
||||
}
|
||||
|
||||
// A kqueue cannot monitor a raw Mach receive right with EVFILT_MACHPORT. It
|
||||
// requires a port set. Create a new port set and add the receive right to it.
|
||||
// Prior to macOS 10.12, a kqueue cannot monitor a raw Mach receive right with
|
||||
// EVFILT_MACHPORT. It requires a port set. Compare 10.11.6
|
||||
// xnu-3248.60.10/osfmk/ipc/ipc_pset.c filt_machportattach(), which requires
|
||||
// MACH_PORT_RIGHT_PORT_SET, to 10.12.0 xnu-3789.1.32/osfmk/ipc/ipc_pset.c
|
||||
// filt_machportattach(), which also handles MACH_PORT_TYPE_RECEIVE. Create a
|
||||
// new port set and add the receive right to it.
|
||||
base::mac::ScopedMachPortSet server_port_set(
|
||||
NewMachPort(MACH_PORT_RIGHT_PORT_SET));
|
||||
CHECK(server_port_set.is_valid());
|
||||
|
Loading…
x
Reference in New Issue
Block a user