ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Tcljava-user
Tcljava-user
[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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved