Re: Getting process name from task_struct

From: Augusto Cesar Radtke (radtke@zaz.com.br)
Date: Wed Mar 22 2000 - 19:56:05 EST


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/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:37 EST