From: Stu Grossman Date: Tue, 31 Mar 1992 19:03:28 +0000 (+0000) Subject: * procfs.c (open_proc_file): Disable inherit-on-fork flag so that X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fad3fc945a3730d8b17036b6f97131c7f95c20f3;p=binutils-gdb.git * procfs.c (open_proc_file): Disable inherit-on-fork flag so that commands in .cshrc/.profile won't get traced. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 304f67457ac..92e7156308d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Mar 31 11:01:06 1992 Stu Grossman (grossman at cygnus.com) + + * procfs.c (open_proc_file): Disable inherit-on-fork flag so that + commands in .cshrc/.profile won't get traced. + Tue Mar 31 08:11:58 1992 John Gilmore (gnu at cygnus.com) * elfread.c (elf_symtab_read): Use xmalloc, not bfd_xmalloc. diff --git a/gdb/procfs.c b/gdb/procfs.c index 58e8878633e..04fed86cc06 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -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); }