NAME
port_extract_send-extracts a task’s send rights
port_extract_receive-extracts a task’s receive/ownership rights

SYNOPSIS
#include <mach.h>

kern_return_t port_extract_send(task, his_name, his_port)
task_t task;
port_name_this_name;
port_t *his_port;/* out */
kern_return_t port_extract_receive(task, his_name, his_port)
task_t task;
port_name_this_name;
port_t *his_port;/* out */

ARGUMENTS
task The task whose rights the caller takes.

his_name The name by which task knows the rights.

his_port Rights returned to the caller.

DESCRIPTION
port_extract_send and port_extract_receive remove task’s rights for
a port and return the rights to the caller.
task is left with no rights for the port.

port_extract_send extracts send rights; task can’t have receive or
ownership rights for the named port. port_extract_rights extracts
receive/ownership rights, both of which task must hold.

DIAGNOSTICS
KERN_SUCCESS The call succeeded.

KERN_INVALID_ARGUMENT
task was invalid or his_name does not name a
port for which task has the required rights.

BUGS
There is no way to extract just receive rights or just ownership
rights.

SEE ALSO
port_insert(2)