[tcljava-user] Calls to "exit" in tcl interpreter thread
by =?iso-8859-1?q?David=20Kelly?= other posts by this author
Jan 27 2004 7:20PM messages near this date
[tcljava-user] Tclblend flushing output
|
[tcljava-user] Re: JACL Fresher
Hello,
Firstly, thanks to all those you have been working on
tclblend/jacl.
I have recently begun using tclblend to create an
automation manager to run existing expect scripts.
Using tclblend 1.3.1, tcl 8.4.4, java 1.2.2 and expect
5.39 on a solaris and following the article "Embedding
a Tcl Interpreter in Java" by Jiang Wu, I was able to
create a thread, run a tcl interpreter in that thread,
load the expect lib, and run some basic test scripts
using interp.eval("source " + files[i]); Everything
looked ok until the scripts end where they call "exit
$error_count". When this is called, not only does the
script, the interpreter and the thread end, the whole
jvm exits! The shell reports the exit status of the
tcl script - e.g if the script called "exit 2", the
unix shell reported an exit status of "2". A work
around is to call "return $error_code" but since these
are existing scripts, I don't think I am able to
change them.
I was wondering if this is expected behaviour as it
seems a bit odd, or if there is a work around or patch
for this? If evalFile was implemented would it behave
in the same way?
Any thoughts would be appreciated.
Thanks,
David
http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
tcljava-user mailing list
tcljava-user@[...].net
https://lists.sourceforge.net/lists/listinfo/tcljava-user
|