Function - Return a send write to the indicated special port.
kern_return_t task_get_special_port (task_t task, int which_port, task special_port); Macro Forms: kern_return_t task_get_bootstrap_port (task_t task, task special_port); kern_return_t task_get_kernel_port (task_t task, task special_port); kern_return_t task_get_host_name_port (task_t task, task special_port);
The task_get_special_port function returns a send right for a special port belonging to task.
If one task has a send right for the kernel port of another task, it can use the port to perform kernel operations for the other task. Send rights for a kernel port normally are held only by the task to which the port belongs, or by the task's parent task. Using the mach_msg function, however, any task can pass a send right for its kernel port to another task.
The current implementation does not support the TASK_HOST_NAME_PORT features associated with this interface.
Only generic errors apply.
Functions: mach_task_self, task_create, task_set_special_port, thread_get_special_port, thread_set_special_port, mach_host_self.