ANOTHER dejagnu problem on cygwin (with work around)

Billinghurst, David (CRTS) David.Billinghurst@riotinto.com
Sun Jul 21 09:01:00 GMT 2002


Adam (and others),

I have worked around another dejagnu problem found when running
the libjava testsuite on cygwin.  As I mentioned last week, there
are problems killing execution tests that time out.  The patch
I posted is no longer adequate.  The following worked for me today.
It is (obviously) work in progress.

$ diff -u remote.exp.bak remote.exp
--- remote.exp.bak      2002-05-09 00:21:59.000000000 +1000
+++ remote.exp  2002-07-22 00:36:10.000000000 +1000
@@ -317,7 +317,21 @@
            # This is very, very nasty. Then again, if after did something
            # reasonable...
            set pgid "-[join $pid { -}]";
-           exec sh -c "(kill -2 $pgid || kill -2 $pid) && sleep 5 && (kill $pgid || kill $pid) && sleep 5 && (kill -9 $pgid || kill -9 $pid)" &;
+            # and this is a nasty change to it (DB - local hack)
+            set my_pid [lindex $pid 0];
+            set my_ppid [lindex $pid 1];
+            verbose "doing kill, my_pid is $my_pid, my_ppid is $my_ppid";
+            #
+           #exec sh -c "kill -9 $my_pid";
+           if [ catch {exec sh -c "kill -9 $my_pid"} ] {
+               verbose "Error killing $my_pid";
+               if { $my_ppid > 0 } {
+                   verbose "Killing $my_ppid";
+                   if [ catch {exec sh -c "kill -9 $my_ppid"} ] {
+                       verbose "Error killing $my_ppid too";
+                   }
+               }
+           }
        }
        verbose "pid is $pid";
        catch "close -i $shell_id";



More information about the Java mailing list