summaryrefslogtreecommitdiff
path: root/libports/reallocate-port.c
diff options
context:
space:
mode:
Diffstat (limited to 'libports/reallocate-port.c')
-rw-r--r--libports/reallocate-port.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libports/reallocate-port.c b/libports/reallocate-port.c
index cc534eb4..4e859a1f 100644
--- a/libports/reallocate-port.c
+++ b/libports/reallocate-port.c
@@ -59,6 +59,10 @@ ports_reallocate_port (void *portstruct)
pthread_mutex_unlock (&_ports_lock);
assert_perror (err);
+ /* This is an optimization. It may fail. */
+ mach_port_set_protected_payload (mach_task_self (), pi->port_right,
+ (unsigned long) pi);
+
err = mach_port_move_member (mach_task_self (), pi->port_right,
pi->bucket->portset);
assert_perror (err);