NAME
port_rename - change a task’s name for a port or port
set
SYNOPSIS
#include <mach.h>
kern_return_t port_rename(task,
old_name, new_name)
task_t task;
port_name_t old_name;
port_name_t new_name;
ARGUMENTS
task The task whose port name space is changed.
old_name The name being changed.
new_name The new value for old_name.
DESCRIPTION
port_rename changes the name by which a port or port set is
known
to task. new_name must not already be in use, and it
can’t be a
distinguished value like PORT_NULL.
DIAGNOSTICS
KERN_SUCCESS The call succeeded.
KERN_NAME_EXISTS task already
has a right named
new_name.
KERN_INVALID_ARGUMENT task was
invalid or task did not have
any rights named old_name or new_name
was an invalid name.
SEE ALSO
port_names(2)