Re: current_proc() issue on leopard
Re: current_proc() issue on leopard
- Subject: Re: current_proc() issue on leopard
- From: Michael Smith <email@hidden>
- Date: Thu, 20 Mar 2008 10:15:05 -0700
On Mar 20, 2008, at 2:08 AM, Praveen Kumar wrote:
The following code gives the current process name.
struct proc *p = current_proc();
p->p_comm // contains current process name
On Tiger, it is working fine, but on leopard, p_comm is empty.
Please let me know if there are alternate ways to get the current
process name.
Some unsolicited advice: do not use the process name for anything
other than debugging purposes.
In particular, do not make any decisions whatsoever based on the name
that a given process might have. The name is not guaranteed to be
unique, and it can be changed trivially.
= Mike
_______________________________________________
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