2003-02-25 Jeff Johnston <jjohnstn@redhat.com>
authorJeff Johnston <jjohnstn@redhat.com>
Tue, 25 Feb 2003 19:38:21 +0000 (19:38 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Tue, 25 Feb 2003 19:38:21 +0000 (19:38 +0000)
        * infptrace.c (detach): Do not flag error if ptrace detach fails
        and errno is set to ESRCH.

gdb/ChangeLog
gdb/infptrace.c

index e2a7e52..c734338 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-25  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * infptrace.c (detach): Do not flag error if ptrace detach fails
+       and errno is set to ESRCH.
+
 2003-02-24  Andrew Cagney  <cagney@redhat.com>
 
        * infptrace.c (udot_info): Change type of udot_off to long.  Use
index e75ea4c..a142080 100644 (file)
@@ -301,7 +301,7 @@ detach (int signal)
   errno = 0;
   ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1,
           signal);
-  if (errno)
+  if (errno && errno != ESRCH)
     perror_with_name ("ptrace");
   attach_flag = 0;
 }