lkml.org 
[lkml]   [2002]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: absolute path of a process
Date
Followup to:  <3C3C8188.E5F7677E@nbnet.nb.ca>
By author: Senhua Tao <stao@nbnet.nb.ca>
In newsgroup: linux.dev.kernel
>
> Hi,
>
> I am new to linux kernel. I like to know is there any way to find
> the absolute path of a process. I mean, how the kernel knows which
> process is currently running? I tried to follow the current variable
> but got lost. Is the inode struct should I look at?
>

Examine /proc/self/exe.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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