diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-18 17:17:55 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-18 17:17:55 +0000 |
commit | 23eabd6aa12fdee55ad81f2c7012155ad02f6b44 (patch) | |
tree | 8fda1ec1199140ca327415236d74478beefd137a /libjava/testsuite/lib | |
parent | 6017c38cacdaed72e34c354703ebdf349a309270 (diff) | |
download | gcc-23eabd6aa12fdee55ad81f2c7012155ad02f6b44.tar.gz |
* 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
Diffstat (limited to 'libjava/testsuite/lib')
-rw-r--r-- | libjava/testsuite/lib/libjava.exp | 9 |
1 files changed, 7 insertions, 2 deletions
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 |