Messages in this thread | | | Date | Wed, 22 Mar 2000 21:56:05 -0300 (BRT) | From | Augusto Cesar Radtke <> | Subject | Re: Getting process name from task_struct |
| |
On Wed, 22 Mar 2000, Krisztian Flautner wrote:
> > > Hello, > > I would like to be able to lookup the process name given a pointer > to the task_struct from the kernel. The code that needs to do this > is running in the kernel, so I would prefer not to go through > the proc file system. > > I am assuming that the data is in the mm structure that the > task_struct points to. Is there a macro or a function that > extracts this information? Does anyone have some code that does > this?
Maybe the comm variable at task_struct struct?
Sometimes when I start a thread I make:
sprintf(current->comm, "name");
strcpy() should work fine.
-augusto
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |