hello,everybody.
I came across a question,In function
send_sig_info(sig,info,p) I want to find out current process is
sending
sig to which process ,although p stand for this
process,i
want to get the absolute pathname of process p(p->comm
doesn't tell that) I use function like this:
get_exename(struct task_struct *p)
{...
vma = p->mm->mmap;
entry =
vma->vm_file->f_dentry;
d_path(entry,vma->vm_file->f_vfsmnt,buf,sizeof(buf));
...
}
all pointer are not null ,but system
crash,
who can tell me where i am wrong,and the correct way to do
this? thank you in advance.
|