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 9:48 AM, Andy Pavlo wrote:

On Tuesday 01 August 2006 22:40, Terry Lambert wrote:
Since you are spawning the process off, presumably you are the parent
for the process.

The process that we spawn is a user's job that wants to run in our distributed
batch system; therefore we have no control of it and cannot use the method
that you suggested. We need to be able to get process information from any
process that has the same uid as we do.

You should be able to do this via the method I described, as long as there is a hierarchical relationship between parent and child processes. This would fail on things which attempt to daemonize themselves automatically (i.e. call fork themselves), so I could see where this might be a problem.


If this is the case for you, you will either need to have privilege on the system (i.e. "be root" / have group "procmod"), or you will need to have privilege at some point since the boot of the system in order to use sysctlbyname("kern.tfp.policy", NULL, NULL, &int_var, sizeof (int_var)) to change the enforcement policy to KERN_TFP_POLICY_PERMISSIVE. This is *NOT* recommended; there are security, portability, and other concerns when doing this.

We are going to discuss other options and are responding to the other thread
in darwin-dev. Thanks for your help.

No problem; I've been a fan of the "Condor" concept since first reading the paper in 1993... feel free to post again, if you have other issues, though it may not be me that tries to answer...


-- Terry

--
Andy Pavlo
email@hidden
 _______________________________________________
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

_______________________________________________ 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: 
 >Retrieving process information without using ps (From: Andy Pavlo <email@hidden>)
 >Re: Retrieving process information without using ps (From: Terry Lambert <email@hidden>)
 >Re: Retrieving process information without using ps (From: Andy Pavlo <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.