aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/attach-twice.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/attach-twice.exp')
-rw-r--r--gdb/testsuite/gdb.base/attach-twice.exp5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/attach-twice.exp b/gdb/testsuite/gdb.base/attach-twice.exp
index f6a9eb6..380c80e 100644
--- a/gdb/testsuite/gdb.base/attach-twice.exp
+++ b/gdb/testsuite/gdb.base/attach-twice.exp
@@ -27,7 +27,8 @@ if { [prepare_for_testing ${testfile}.exp $executable] } {
# Start the program running and then wait for a bit, to be sure
# that it can be attached to.
-set testpid [spawn_wait_for_attach $binfile]
+set test_spawn_id [spawn_wait_for_attach $binfile]
+set testpid [spawn_id_get_pid $test_spawn_id]
set parentpid 0
@@ -48,4 +49,4 @@ gdb_test_multiple "attach $testpid" $test {
if {$parentpid != 0} {
eval exec kill -9 $parentpid
}
-eval exec kill -9 $testpid
+kill_wait_spawned_process $test_spawn_id