2000-11-09 17:42:33

by Chris Swiedler

[permalink] [raw]
Subject: getting a process name from task struct

Is it possible to get a process's name / full execution path (from
kernelspace) given only a task struct? I can't find any pointers to this
information in the task struct, and I don't know where else it might be. ps
seems to be able to get the process name, but that's from userspace.
Apologies in advance if this is a stupid question.

chris


2000-11-09 18:00:29

by George Anzinger

[permalink] [raw]
Subject: Re: getting a process name from task struct

Chris Swiedler wrote:
>
> Is it possible to get a process's name / full execution path (from
> kernelspace) given only a task struct? I can't find any pointers to this
> information in the task struct, and I don't know where else it might be. ps
> seems to be able to get the process name, but that's from userspace.
> Apologies in advance if this is a stupid question.
>
> chris
>
Try the "comm" member of task_struct. (Clear name, right?)

George