On Mon, Oct 3, 2016 at 7:00 AM, Kalle Olavi Niemitalo <k...@iki.fi> wrote:
> "Brent W. Baccala" <cos...@freesoft.org> writes: > > > Now I'm wondering - how would DEAD NAME notifications be handled? > rpctrace > > would want to transfer send rights with the DN notifications attached (so > > it could wrap them both), but my experience, and my understanding of the > > Mach documentation, is that moving a send right with a DN request > triggers > > a PORT DELETED notification, which is not what we would want. > > Before rpctrace moves the send right from the target task, it > could call mach_port_request_notification to cancel the dead-name > notification request. This call returns the send-once right to > which the notification would have been sent. After rpctrace has > moved the rights, it could restore the notification request, > now with a wrapped send right and a wrapped send-once right. > Good idea! We can also use the same approach to handle no-sender notifications - separate them from the receive rights before moving them both. So I think we're OK destroying no-sender notifications when moving receive rights. agape brent