NAME
port_allocate - creates a port in a specified task
SYNOPSIS
#include <mach.h>
kern_return_t
port_allocate(task, port_name)
task_t task;
port_name_t *port_name; /* out */
ARGUMENTS
task The task in which the new port is created.
port_name The task’s name for the new port.
DESCRIPTION
port_allocate causes a port to be created for the specified
task;
the resulting port’s name is returned in port_name.
The target
task initially has all three access rights to the port. The
new
port is not a member of any port set.
DIAGNOSTICS
KERN_SUCCESS The call succeeded.
KERN_INVALID_ARGUMENT task was invalid.
KERN_RESOURCE_SHORTAGE The kernel ran out of memory.
SEE ALSO
port_deallocate(2)