aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorNate Williams <nate@FreeBSD.org>1995-04-10 00:01:01 +0000
committerNate Williams <nate@FreeBSD.org>1995-04-10 00:01:01 +0000
commitb6b718f3267dd0d193f00f8bac6752193d40b777 (patch)
treee84be50673597ed2af4ef8ed63dc6eadb986772e /gnu
parent9d9cea2bcef4ed6ddadcedc9daa32b49640882f3 (diff)
downloadsrc-b6b718f3267dd0d193f00f8bac6752193d40b777.tar.gz
src-b6b718f3267dd0d193f00f8bac6752193d40b777.zip
as Thomas Graichen recently wrote in private mail:
> * the gdb-4.13 of current (compiled and used under 2.0R) can not attach to my > own processes (it works only then i'm root - else i get open failed - for my > own processes) how embarassing ! This turns out to be a bug in infptrace.c. Below is a patch. Could some kind soul apply it ? Submitted by: "Gary J." <garyj@rks32.pcs.dec.com>
Notes
Notes: svn path=/head/; revision=7725
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/gdb/gdb/infptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/gdb/gdb/infptrace.c b/gnu/usr.bin/gdb/gdb/infptrace.c
index d648e0a89975..cb3fd14b8de3 100644
--- a/gnu/usr.bin/gdb/gdb/infptrace.c
+++ b/gnu/usr.bin/gdb/gdb/infptrace.c
@@ -175,7 +175,7 @@ attach (pid)
int fd;
sprintf(procfile, "/proc/%d/ctl", pid);
- fd = open(procfile, O_RDWR, 0);
+ fd = open(procfile, O_WRONLY, 0);
if (fd < 0) {
perror_with_name ("open");
@@ -217,7 +217,7 @@ detach (signal)
int fd;
sprintf(procfile, "/proc/%d/ctl", inferior_pid);
- fd = open(procfile, O_RDWR, 0);
+ fd = open(procfile, O_WRONLY, 0);
if (fd < 0) {
perror_with_name ("open");