Function - Provide caller with an array of the target task's well-known ports.
kern_return_t mach_ports_lookup (task_t target_task, mach_port_array_t init_port_set, mach_msg_type_number_t init_port_count);
The mach_ports_lookup function returns an array of the well-known system ports that are currently registered for the specified task. Note that the task holds only send rights for the ports.
Registered ports are those ports that are used by the run-time system to initialize a task. To register system ports for a task, use the mach_ports_register function.
Only generic errors apply.