Re: kinfo_proc structure
Re: kinfo_proc structure
- Subject: Re: kinfo_proc structure
- From: mm w <email@hidden>
- Date: Thu, 2 Jul 2009 08:08:55 -0700
On Thu, Jul 2, 2009 at 6:17 AM, Rahulkumar
Tibdewal<email@hidden> wrote:
> Hello All,
>
>
>
> I have a kinfo_proc populated. I am facing 2 problems mainly.
>
>
>
> 1. This one may be simple to answer but it is giving me tough time.
>
> I want to find the user id with the associated process id. Process id is
> already available to us from kinfo_proc.
>
/usr/include/sys/sysctl.h
struct _pcred e_pcred; /* process credentials */
struct _ucred e_ucred; /* current credentials */
struct kinfo_proc *kp;
struct eproc *ep;
ep = &kp->kp_eproc;
uid = ep->e_ucred.cr_uid;
>
>
> 2. Another one is little wired. Once kinfo_proc is populated, one can
> think that it has been populated by all running process in the system.
>
> Whereas it misses one ccollabgui.app process. And I can see its entry from
> ps-ef. Am I missing something?
>
clarify
>
>
> Any help is highly appreciated.
>
>
>
> Thanks
>
> Rahul
>
> DISCLAIMER ========== This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden