lkml.org 
[lkml]   [2000]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.025 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site