Re: absolute path of a process

H. Peter Anvin
2002-01-09T23:39:15Z

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>