mach_ports_lookup


Function - Provide caller with an array of the target task's well-known ports.

SYNOPSIS

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);

PARAMETERS

target_task
[in task send right] The task whose currently registered ports are to be returned.

init_port_set
[out pointer to dynamic array of registered send rights] The returned array of ports.

init_port_count
[out scalar] The number of returned port rights.

DESCRIPTION

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.

RETURN VALUES

Only generic errors apply.

RELATED INFORMATION

Functions: mach_ports_register.