Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Retrieving process information without using ps




On Aug 2, 2006, at 3:46 PM, Greg Parker wrote:

You have to send it in a Mach message; specifically, access rights to
a port are granted to a task by sending a "send right" or "receive
right" message to the task you want to be able to use the port;

Yes, I understand that. But how does the child send a Mach message
to the parent? How does it get a send right for a port for which the parent
owns the receive right? As far as I can tell, the child doesn't have the
parent's task port, nor any other port the parent had before fork().

That's correct. At the Mach level, tasks don't *have* parent-child relationships (in the traditional Unix sense). So you have to advertise a port by registering a name for it. (It need not be a well- known name... You can pass it [the name] as a command-line argument to the "child" process.)


-- Kaelin

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/unix-porting/email@hidden

This email sent to email@hidden
References: 
 >Re: Retrieving process information without using ps (From: Terry Lambert <email@hidden>)
 >Re: Retrieving process information without using ps (From: Greg Parker <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.