From 68c9da300bc7b0d1245111a0e29471f721fa490d Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 5 Nov 2012 18:56:45 +0000 Subject: gdb/ 2012-11-05 Pedro Alves * inferior.c (exit_inferior_1): Clear 'vfork_parent' in the vfork child. Clear 'pending_detach'. * infrun.c (handle_vfork_child_exec_or_exit): Clear 'pending_detach' in the vfork parent. gdb/testsuite/ 2012-11-05 Pedro Alves * gdb.base/foll-vfork.exp (vfork_relations_in_info_inferiors): New procedure. (do_vfork_and_follow_child_tests_exec) (do_vfork_and_follow_child_tests_exit): Call it. --- gdb/inferior.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gdb/inferior.c') diff --git a/gdb/inferior.c b/gdb/inferior.c index f45058a..f46e1e3 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -266,9 +266,15 @@ exit_inferior_1 (struct inferior *inftoex, int silent) inf->vfork_parent->vfork_child = NULL; inf->vfork_parent = NULL; } + if (inf->vfork_child != NULL) + { + inf->vfork_child->vfork_parent = NULL; + inf->vfork_child = NULL; + } inf->has_exit_code = 0; inf->exit_code = 0; + inf->pending_detach = 0; } void -- cgit v1.1