Did you mean exe file name? You can get exe of the current process as follows:
char *pathname,*p; mm = current->mm; if (mm) { down_read(&mm->mmap_sem); if (mm->exe_file) { pathname = kmalloc(PATH_MAX, GFP_ATOMIC); if (pathname) { p = d_path(&mm->exe_file->f_path, pathname, PATH_MAX); } } up_read(&mm->mmap_sem); }
PaulDaviesC
source share