mach message disposition & transferring rights
mach message disposition & transferring rights
- Subject: mach message disposition & transferring rights
- From: Neal Sidhwaney <email@hidden>
- Date: Sun, 1 Feb 2009 20:55:20 -0800
Hi,
I was wondering if someone could comment a little on the
semantics of the different dispositions when transferring port rights
between tasks using mach_msg. Specifically, what is the difference
between MACH_MSG_TYPE_COPY_SEND and MACH_MSG_TYPE_MOVE_SEND? And does
the latter do any reference count modification in the sending task?
What happens if someone is using MACH_MSG_TYPE_MOVE_SEND and
transferring the send right to the task's kernel port(e.g.
mach_task_self()) to another task?
The issue I'm seeing is that if I use MACH_MSG_TYPE_MOVE_SEND,
after sending two of these messages, further attempts result in an
'invalid port right' error code from mach_msg. I know it's because of
the mach_task_self() port because if I remove it, I don't get this
error any more. I think the right fix is to use
MACH_MSG_TYPE_COPY_SEND but I am just curious about the semantics
around these dispositions( I checked the mach Server Writer's guide but
from what I could see it mostly talked about this is the context of
generating MIG interfaces). If it's relevant, I'm sending these messages to a port returned when looking up a bootstrap service.
Thanks!
Neal
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden