From 83b1cc25d102625b379de9b65b54cd727ae49333 Mon Sep 17 00:00:00 2001 From: Bob Manson Date: Fri, 31 Jan 1997 00:51:45 +0000 Subject: [PATCH] * lib/gdb.exp(default_gdb_exit): Add a catch to the close and wait commands, as the descriptor may now be invalid. Always call "remote_close host". Makes sure things get cleaned up if gdb dies in the middle of a test. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/lib/gdb.exp | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d317dc34890..8bf1be6445e 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +Thu Jan 30 16:49:25 1997 Bob Manson + + * lib/gdb.exp(default_gdb_exit): Add a catch to the + close and wait commands, as the descriptor may now be + invalid. Always call "remote_close host". + Tue Jan 28 14:42:31 1997 Bob Manson Major rewrite for testsuite revision. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 88894927bac..e6d86f25a47 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -594,17 +594,17 @@ proc default_gdb_exit {} { } -i $gdb_spawn_id timeout { } } - remote_close host; } else { # We used to try to send_gdb "quit" to GDB, and wait for it to die. # Dealing with all the cases and errors got pretty hairy. Just close it, # that is simpler. - close -i $gdb_spawn_id + catch "close -i $gdb_spawn_id" # Omitting this probably would cause strange timing-dependent failures. - wait -i $gdb_spawn_id + catch "wait -i $gdb_spawn_id" } + remote_close host; unset gdb_spawn_id } -- 2.30.2