* linux-fork.c (linux_fork_detach): New.
[deliverable/binutils-gdb.git] / gdb / inf-ptrace.c
index 7bdf2fac36cecdeb8d8b490924e427d449705fbc..8ae1161a9d652984e218f5abd6e2d335c64dc2ac 100644 (file)
@@ -309,7 +309,9 @@ inf_ptrace_detach (struct target_ops *ops, char *args, int from_tty)
 
   inferior_ptid = null_ptid;
   detach_inferior (pid);
-  unpush_target (ops);
+
+  if (!have_inferiors ())
+    unpush_target (ops);
 }
 
 /* Kill the inferior.  */
@@ -389,7 +391,6 @@ inf_ptrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
   do
     {
       set_sigint_trap ();
-      set_sigio_trap ();
 
       do
        {
@@ -398,7 +399,6 @@ inf_ptrace_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
        }
       while (pid == -1 && errno == EINTR);
 
-      clear_sigio_trap ();
       clear_sigint_trap ();
 
       if (pid == -1)
This page took 0.02254 seconds and 4 git commands to generate.