@@ -1,5 +1,10 @@
2016-06-24 John Baldwin <jhb@FreeBSD.org>
+ * fbsd-nat.c (fbsd_follow_fork): Only detach child if
+ "detach_fork" is true.
+
+2016-06-24 John Baldwin <jhb@FreeBSD.org>
+
* fbsd-tdep.c: Include "auxv.h".
(fbsd_print_auxv_entry): New function.
(fbsd_init_abi): Install gdbarch "print_auxv_entry" method.
@@ -792,7 +792,7 @@ static int
fbsd_follow_fork (struct target_ops *ops, int follow_child,
int detach_fork)
{
- if (!follow_child)
+ if (!follow_child && detach_fork)
{
struct thread_info *tp = inferior_thread ();
pid_t child_pid = ptid_get_pid (tp->pending_follow.value.related_pid);