diff options
author | Pedro Alves <palves@redhat.com> | 2012-11-05 18:56:43 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-11-05 18:56:43 +0000 |
commit | 9d2d268c97cb5bcbe5ee8f9dac1ce67a8c058c9c (patch) | |
tree | 66335844b7d57db296f0b7bf4da5da5b5d0d8e8c /gdb/inferior.c | |
parent | f7200c92a94917183853919b401825e6c633e86e (diff) | |
download | gdb-9d2d268c97cb5bcbe5ee8f9dac1ce67a8c058c9c.tar.gz |
gdb/
2012-11-05 Pedro Alves <palves@redhat.com>
* 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 <palves@redhat.com>
* 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.
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r-- | gdb/inferior.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c index f45058aa815..f46e1e336cc 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 |