Re: bootstrap_register replacement
Re: bootstrap_register replacement
- Subject: Re: bootstrap_register replacement
- From: Damien Sorresso <email@hidden>
- Date: Sun, 18 Jan 2009 23:52:42 -0800
On Jan 15, 2009, at 2:19 PM, Ed Wynne wrote:
On Jan 15, 2009, at 2:40 PM, Damien Sorresso wrote:
Task special ports are inherited across fork(2).
0. In parent, create a new port (Port A) to which you hold a
receive right.
1. Insert a send right into that port.
2. Cache your current task bootstrap port.
3. Set the task bootstrap port to Port A.
4. fork(2) / exec(2) your child.
5. In the parent, set your task bootstrap port back to the cached
port.
6. Have the child send a message to the parent (via its bootstrap
port) requesting all the information it needs, perhaps including
the parent's bootstrap port.
7. Optionally, have the child reset its bootstrap port to the
parent's bootstrap port.
#7 should not be optional. Frameworks and other system services may
depend on the bootstrap port being what it claims. It should
mandatorily be set back, ASAP.
Indeed. Though it should be noted that this isn't really that urgent
if you create a bootstrap subset. Though I don't really recommend
that. Mac OS X is trending toward flat per-user namespaces.
--
Damien Sorresso
BSD Engineering
Apple Inc.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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