]>
Commit | Line | Data |
---|---|---|
e220cfe6 MT |
1 | --- dejagnu-1.4.4/lib/remote.exp.smp 2003-10-10 23:42:46.000000000 -0700 |
2 | +++ dejagnu-1.4.4/lib/remote.exp 2005-08-05 12:32:10.107161990 -0700 | |
3 | @@ -91,9 +91,13 @@ proc local_exec { commandline inp outp t | |
4 | # programs that bear children. We can't use tcl's exec because it has | |
5 | # no way to timeout programs that hang. *sigh* | |
6 | # | |
7 | + # The expect command will close the connection when it sees EOF. On | |
8 | + # SMP machine, close the connection may send SIGHUP to the child | |
9 | + # and cause it to exit before it can exit normally. We should make | |
10 | + # the child to ignore SIGHUP. | |
11 | if { "$inp" == "" && "$outp" == "" } { | |
12 | set id -1 | |
13 | - set result [catch "eval spawn \{${commandline}\}" pid] | |
14 | + set result [catch "eval spawn -ignore SIGHUP \{${commandline}\}" pid] | |
15 | if { $result == 0 } { | |
16 | set result2 0 | |
17 | } else { | |
18 | @@ -134,7 +138,7 @@ proc local_exec { commandline inp outp t | |
19 | return [list -1 "open of $commandline $inp $outp failed: $errorInfo"] | |
20 | } | |
21 | set pid [pid $id] | |
22 | - set result [catch "spawn -leaveopen $id" result2] | |
23 | + set result [catch "spawn -ignore SIGHUP -leaveopen $id" result2] | |
24 | } | |
25 | # Prepend "-" to each pid, to generate the "process group IDs" needed by | |
26 | # kill. |