Richard Braun <rbr...@sceen.net> writes:

> I don't believe the Hurd ever moves receive rights, and if it is,
> it's most certainly very limited and local.

proc_handle_exceptions and startup_essential_task have a
"msgport: mach_port_move_receive_t" parameter.

In glibc, hurd/hurdfault.c (_hurdsig_fault_init) creates a port
with both receive and send rights, moves the receive right via
proc_handle_exceptions, and tells Mach to report exceptions of
the msgport thread to the send right.  It does not request
no-senders notification on the port before it moves the receive
right.

startup_essential_task is called from lots of places in the Hurd,
but the msgport argument seems to be MACH_PORT_NULL each time,
and startup/startup.c (S_startup_essential_task) does not even
use that parameter; I think it would leak the receive right if
it were given one.

A future version of rpctrace might want to move receive rights
if it were able to attach to a preexisting task.

Reply via email to