System Trap - Return a send right to the caller's task_self port.
#include<mach/mach_traps.h> mach_port_t mach_task_self (void)
None.
The mach_task_self function returns send rights to the task's kernel port.
This function call is redefined in the mach_init.h file to return the caller's mach_task_self_ environment variable, which is cached on behalf of the caller's task at runtime. (The mach_init.h file is itself included via the mach.h file.
Only generic errors apply.
Functions: task_set_special_port.