1 diff -u -ruNp gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp
2 --- gdb-6.3-unpatched/gdb/testsuite/gdb.base/tracefork-zombie.exp 1969-12-31 19:00:00.000000000 -0500
3 +++ gdb-6.3/gdb/testsuite/gdb.base/tracefork-zombie.exp 2007-07-31 13:04:12.000000000 -0400
5 +# Copyright 2007 Free Software Foundation, Inc.
7 +# This program is free software; you can redistribute it and/or modify
8 +# it under the terms of the GNU General Public License as published by
9 +# the Free Software Foundation; either version 2 of the License, or
10 +# (at your option) any later version.
12 +# This program is distributed in the hope that it will be useful,
13 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
14 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 +# GNU General Public License for more details.
17 +# You should have received a copy of the GNU General Public License
18 +# along with this program; if not, write to the Free Software
19 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 +# are we on a target board
22 +if [is_remote target] then {
26 +# Start the program running and then wait for a bit, to be sure
27 +# that it can be attached to.
33 +set gdb_pid [exp_pid -i [board_info host fileid]]
34 +set test "identified the child GDB"
35 +if {$gdb_pid != "" && $gdb_pid > 0} {
37 + verbose -log "Child GDB PID $gdb_pid"
42 +set testpid [eval exec sleep 10 &]
46 +gdb_test_multiple "attach $testpid" "$test" {
47 + -re "Attaching to program.*`?.*'?, process $testpid..*$gdb_prompt $" {
50 + -re "Attaching to program.*`?.*\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" {
51 + # Response expected on Cygwin
56 +# Some time to let GDB spawn its testing child.
60 +foreach procpid [glob -directory /proc -type d {[0-9]*}] {
61 + if {[catch {open $procpid/status} statusfi]} {
64 + set status [read $statusfi]
67 + && [regexp -line {^Name:\tgdb$} $status]
68 + && [regexp -line {^PPid:\t1$} $status]
69 + && [regexp -line "^TracerPid:\t$gdb_pid$" $status]} {
71 + verbose -log "Found linux_test_for_tracefork zombie PID $procpid"
74 +set test "linux_test_for_tracefork leaves no zombie"
75 +if {$found eq {none}} {