* procfs.c (open_proc_file): Disable inherit-on-fork flag so that
commands in .cshrc/.profile won't get traced.
This commit is contained in:
parent
3b0b92207c
commit
fad3fc945a
2 changed files with 9 additions and 0 deletions
|
@ -1238,8 +1238,12 @@ open_proc_file (pid, pip)
|
|||
sprintf (pip -> pathname, PROC_NAME_FMT, pid);
|
||||
if ((pip -> fd = open (pip -> pathname, O_RDWR)) >= 0)
|
||||
{
|
||||
long pr_flags;
|
||||
|
||||
pip -> valid = 1;
|
||||
pip -> pid = pid;
|
||||
pr_flags = PR_FORK;
|
||||
(void) ioctl (pip -> fd, PIOCRESET, &pr_flags);
|
||||
}
|
||||
return (pip -> valid);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue