aboutsummaryrefslogtreecommitdiff
path: root/gdb/fbsd-nat.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2016-06-24 18:24:21 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2016-07-01 08:32:38 -0700
commitbb2a62e694953c099c41d49f59947d3d91cc7c27 (patch)
treeb2867bf20233c3c7c09d2db1222ced688f8ef18a /gdb/fbsd-nat.c
parent5e866f5aeeaf7514f5ca4f9eaba41594eac22e5b (diff)
downloadgdb-bb2a62e694953c099c41d49f59947d3d91cc7c27.zip
gdb-bb2a62e694953c099c41d49f59947d3d91cc7c27.tar.gz
gdb-bb2a62e694953c099c41d49f59947d3d91cc7c27.tar.bz2
Honor detach-on-fork on FreeBSD.
Only detach from the new child process in the follow fork callback if detach_fork is true. gdb/ChangeLog: * fbsd-nat.c (fbsd_follow_fork): Only detach child if "detach_fork" is true.
Diffstat (limited to 'gdb/fbsd-nat.c')
-rw-r--r--gdb/fbsd-nat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c
index c9548e9..0999712 100644
--- a/gdb/fbsd-nat.c
+++ b/gdb/fbsd-nat.c
@@ -826,7 +826,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);