From 23eabd6aa12fdee55ad81f2c7012155ad02f6b44 Mon Sep 17 00:00:00 2001 From: tromey Date: Thu, 18 May 2000 17:17:55 +0000 Subject: * lib/libjava.exp (bytecompile_file): Use exec, not system. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33989 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/testsuite/lib/libjava.exp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libjava/testsuite/lib/libjava.exp') diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index 3d1e8c8b5a1..cf9b9a95ba2 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -49,7 +49,7 @@ proc find_gcjh {} { proc bytecompile_file { file objdir {classpath {}} } { global env global SUN_JAVAC - set dirname [file dirname $file]; + set dirname [file dirname $file] # If JDK doesn't run on your platform but some other # JDK-compatible javac does, you may set SUN_JAVAC to point to it. @@ -72,7 +72,12 @@ proc bytecompile_file { file objdir {classpath {}} } { set env(CLASSPATH) $classpath } if {[catch { - system "cd $dirname; $SUN_JAVAC $file -d $objdir 2>&1" + set here [pwd] + cd $dirname + set q [eval exec "$SUN_JAVAC [list $file] -d $objdir 2>@ stdout"] + cd $here + # "return" a result + set q $q } msg]} then { verbose "couldn't compile $file: $msg" set r 0 -- cgit v1.2.3