error (_("This system does not support detaching from a process"));
#endif
+ inf_ptrace_detach_success (ops);
+}
+
+/* See inf-ptrace.h. */
+
+void
+inf_ptrace_detach_success (struct target_ops *ops)
+{
+ pid_t pid = ptid_get_pid (inferior_ptid);
+
inferior_ptid = null_ptid;
detach_inferior (pid);
ptrace (PT_KILL, pid, (PTRACE_TYPE_ARG3)0, 0);
waitpid (pid, &status, 0);
- target_mourn_inferior ();
+ target_mourn_inferior (inferior_ptid);
}
/* Interrupt the inferior. */