Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: how to get parent process id (ppid) of *another* process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get parent process id (ppid) of *another* process



Thanks, it is definitively what i was looking for. I would never have found that code my self!

On 27 nov. 05, at 02:43, Justin C. Walker wrote:


On Nov 26, 2005, at 16:52 , Aurélien Hugelé wrote:

Hi list !

it's my first post here, because i'm not a low level guy, usually developing with Cocoa high level API... but low level UNIX knowledge is very important and very useful to understand what's behind the hood...

Well, for my project, i need to get the parent process id (ppid) of another process than the current one. Given its pid for example.
In fact, i would like to get exactly what Activity Monitor.app get when using "All processes, Hierarchically" (in the pop up button at the top). The hierarchic mode is able to display the parent process of *any* process...


how is that achieved ? i look at tons of man pages, google etc... i could not find anything useful. I'm pretty sure there is no standart unix call for that but what do i know ? is it a private API ?

Have a look at the source for the 'ps' command (<http:// developer.apple.com/darwin>) in the 'adv_cmds' project. Make sure to look at the source for the version of Mac OS X/Darwin you are using.


Regards,

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Experience is what you get
  when you don't get what you want.
--------



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-userlevel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-userlevel mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >how to get parent process id (ppid) of *another* process (From: Aurélien Hugelé <email@hidden>)
 >Re: how to get parent process id (ppid) of *another* process (From: "Justin C. Walker" <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.