+2001-11-12 Andrew Cagney <ac131313@redhat.com>
+
+ * lib/remote.exp (local_exec, standard_close): Use SHELL
+ background instead of tcl background to background the kill
+ processes. Work around problem found by Nick Duffek in older
+ CYGWINs.
+
2001-10-10 Frank Ch. Eigler <fche@redhat.com>
* config/sid.exp (set_host_info): New proc. Call it to set
# command in order to execute the execution. (English. Gotta love it.)
if { ! $got_eof } {
verbose "killing $pid $pgid";
- exec sh -c "exec > /dev/null 2>&1 && (kill -2 $pgid || kill -2 $pid) && sleep 5 && (kill -15 $pgid || kill $pid) && sleep 5 && (kill -9 $pgid || kill -9 $pid)" &;
+ # This is very, very nasty. SH, instead of EXPECT, is used to
+ # run this in the background since, on older CYGWINs, a
+ # strange file I/O error occures.
+ exec sh -c "exec > /dev/null 2>&1 && (kill -2 $pgid || kill -2 $pid) && sleep 5 && (kill -15 $pgid || kill $pid) && sleep 5 && (kill -9 $pgid || kill -9 $pid) &";
}
# This will hang if the kill doesn't work. Nothin' to do, and it's not ok.
catch "close -i $spawn_id";
}
if { $pid > 0 } {
verbose "doing kill, pid is $pid";
- # This is very, very nasty. Then again, if after did something
- # reasonable...
+ # This is very, very nasty. SH, instead of EXPECT, is used
+ # to run this in the background since, on older CYGWINs, a
+ # strange file I/O error occures.
set pgid "-[join $pid { -}]";
- exec sh -c "exec > /dev/null 2>&1 && (kill -2 $pgid || kill -2 $pid) && sleep 5 && (kill $pgid || kill $pid) && sleep 5 && (kill -9 $pgid || kill -9 $pid)" &;
+ exec sh -c "exec > /dev/null 2>&1 && (kill -2 $pgid || kill -2 $pid) && sleep 5 && (kill $pgid || kill $pid) && sleep 5 && (kill -9 $pgid || kill -9 $pid) &";
}
verbose "pid is $pid";
catch "close -i $shell_id";