* path_lookup for executable
@ 2006-11-20 4:00 e m
2006-11-20 8:05 ` Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: e m @ 2006-11-20 4:00 UTC (permalink / raw)
To: linux-kernel
I am trying to get inode for an executable program. For example, I wish to
get inode for /usr/jdk/bin/java file in a module. The following call always
return an error. Is there a way to get the inode of current process,
assuming I have access to "current"
PLEASE CC' eyubo@hotmail.com your answers.
Thanks
Eyub
err = path_lookup("/ /usr/jdk/bin/java",
LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_NOALT, &nd);
path_release(&nd);
_________________________________________________________________
Talk now to your Hotmail contacts with Windows Live Messenger.
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://get.live.com/messenger/overview
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: path_lookup for executable
2006-11-20 4:00 path_lookup for executable e m
@ 2006-11-20 8:05 ` Arjan van de Ven
2006-11-20 19:14 ` e m
0 siblings, 1 reply; 4+ messages in thread
From: Arjan van de Ven @ 2006-11-20 8:05 UTC (permalink / raw)
To: e m; +Cc: linux-kernel
On Mon, 2006-11-20 at 04:00 +0000, e m wrote:
> I am trying to get inode for an executable program. For example, I wish to
> get inode for /usr/jdk/bin/java file in a module. The following call always
> return an error. Is there a way to get the inode of current process,
> assuming I have access to "current"
Hi,
what makes you think the current executable has any meaning? It can be
unlinked, renamed or moved in the directory hierarchy since the program
was started... (and if you would go by inode number.. then there's
multiple answers possible)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: path_lookup for executable
2006-11-20 8:05 ` Arjan van de Ven
@ 2006-11-20 19:14 ` e m
2006-11-20 19:27 ` Arjan van de Ven
0 siblings, 1 reply; 4+ messages in thread
From: e m @ 2006-11-20 19:14 UTC (permalink / raw)
To: arjan; +Cc: linux-kernel
Thanks for response. Is there any other way to identify if "current" is a
certain program such as java. You cannot surely go by name (comm field of
task_struct). Since It could be linked. In another word, I want to identify
the executing current program. Any help appreciated.
Thanks,
Eyub
>From: Arjan van de Ven <arjan@infradead.org>
>To: e m <eyubo@hotmail.com>
>CC: linux-kernel@vger.kernel.org
>Subject: Re: path_lookup for executable
>Date: Mon, 20 Nov 2006 09:05:57 +0100
>
>On Mon, 2006-11-20 at 04:00 +0000, e m wrote:
> > I am trying to get inode for an executable program. For example, I wish
>to
> > get inode for /usr/jdk/bin/java file in a module. The following call
>always
> > return an error. Is there a way to get the inode of current process,
> > assuming I have access to "current"
>
>
>Hi,
>
>what makes you think the current executable has any meaning? It can be
>unlinked, renamed or moved in the directory hierarchy since the program
>was started... (and if you would go by inode number.. then there's
>multiple answers possible)
>
>
_________________________________________________________________
Share your latest news with your friends with the Windows Live Spaces
friends module.
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: path_lookup for executable
2006-11-20 19:14 ` e m
@ 2006-11-20 19:27 ` Arjan van de Ven
0 siblings, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2006-11-20 19:27 UTC (permalink / raw)
To: e m; +Cc: linux-kernel
On Mon, 2006-11-20 at 19:14 +0000, e m wrote:
> Thanks for response. Is there any other way to identify if "current" is a
> certain program such as java. You cannot surely go by name (comm field of
> task_struct). Since It could be linked. In another word, I want to identify
> the executing current program. Any help appreciated.
since the binary may have been removed from the disk entirely (and no
that is not a corner case, a lot of the background daemons will have
that if their "original" gets rpm-updated or similar)... what would this
mean? What do you want to use it for?
--
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-20 19:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-20 4:00 path_lookup for executable e m
2006-11-20 8:05 ` Arjan van de Ven
2006-11-20 19:14 ` e m
2006-11-20 19:27 ` Arjan van de Ven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®