absolute path of a process
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?
Thanks.
Sen Tao
Quoted 6 lines · * Senhua Tao ([email protected]) wrote:
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?
look at the code in fs/proc/base.c::proc_exe_link(), that should explain it.
cheers,
-chris
Followup to: <[email protected]> By author: Senhua Tao <[email protected]> In newsgroup: linux.dev.kernel
Quoted 8 lines
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
Signature · 3 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt <[email protected]>