Re: Getting path name of the process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Sridhar N (srin@symonds.net) wrote:
> Hello,
> 	current->comm gives me the name of the executable of the process. How do i 
> get the  full path name of the executable ?

You need the vfsmnt and dentry of the file and then use d_path.  Look at
fs/proc/base.c::proc_exe_link() to see how to get vfsmnt and dentry.

cheers,
-chris
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux