Function - Return the port right names contained in the target port set.
kern_return_t mach_port_get_set_status (ipc_space_t task, mach_port_name_t name, mach_port_name_array_t *members, task count);
The mach_port_get_set_status function returns the individual port right names for all port rights contained in the specified port set. The members parameter is an array that is automatically allocated when the reply message is received. Note that vm_deallocate should be used to free the array.
Note that this interface, unlike others such as task_threads, returns a collection of port right names, NOT a collection of port rights themselves. In other words, this function does not insert port rights into the caller's port right name space; consequently, a call to mach_port_get_set_status does not affect the reference count of each port right within the target port set.
This interface is machine word length specific because of the port name parameter and the returned port names.
Functions: mach_port_insert_member, mach_port_extract_member, mach_port_move_member, vm_deallocate.