* absolute path of a process
@ 2002-01-09 17:44 Senhua Tao
2002-01-09 20:47 ` Chris Wright
2002-01-09 23:38 ` H. Peter Anvin
0 siblings, 2 replies; 3+ messages in thread
From: Senhua Tao @ 2002-01-09 17:44 UTC (permalink / raw)
To: linux-kernel@vger.kernel.org
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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: absolute path of a process 2002-01-09 17:44 absolute path of a process Senhua Tao @ 2002-01-09 20:47 ` Chris Wright 2002-01-09 23:38 ` H. Peter Anvin 1 sibling, 0 replies; 3+ messages in thread From: Chris Wright @ 2002-01-09 20:47 UTC (permalink / raw) To: Senhua Tao; +Cc: linux-kernel@vger.kernel.org * Senhua Tao (stao@nbnet.nb.ca) 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: absolute path of a process 2002-01-09 17:44 absolute path of a process Senhua Tao 2002-01-09 20:47 ` Chris Wright @ 2002-01-09 23:38 ` H. Peter Anvin 1 sibling, 0 replies; 3+ messages in thread From: H. Peter Anvin @ 2002-01-09 23:38 UTC (permalink / raw) To: linux-kernel 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> ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-09 23:39 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-01-09 17:44 absolute path of a process Senhua Tao 2002-01-09 20:47 ` Chris Wright 2002-01-09 23:38 ` H. Peter Anvin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox