hi i have used sys_getpid() from within kernel to get process id how can I find out process name from kernel struct? does it exist in kernel??
thanks very much
you can look at the special files in /proc//
/proc//
For example, /proc//exe is a symlink pointing to the actual binary.
/proc//exe
/proc//cmdline is a null-delimited list of the command line, so the first word is the process name.
/proc//cmdline