path_lookup for executable
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' [email protected] 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
Quoted 4 lines · e m
I am trying to get inode for an executable program. For example, I wish to get inode for
/usr/jdk/bin/javafile 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)
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
Quoted 15 lines
From: Arjan van de Ven <[email protected]>
To: e m <[email protected]>
CC: [email protected]
Subject: Re:path_lookupfor executable
Date: Mon, 20 Nov 2006 09:05:57 +0100Quoted 1 line · e m
I am trying to get inode for an executable program. For example, I wish
to
Quoted 1 line
get inode for
/usr/jdk/bin/javafile in a module. The following callalways
Quoted 2 lines
return an error. Is there a way to get the inode of current process, assuming I have access to "current"
Quoted 8 lines
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
Quoted 4 lines · e m
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?
Signature · 2 lines
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