tclsh stops at exit

From: Julia (
Date: 09/21/04

Date: 21 Sep 2004 09:57:57 -0700


i have a .bat file in which I call a sequence of tclshs, each of which
executes a tcl script with different argument values. E.g.:

tclsh script.tcl arg1 arg2 -arg3 value31 ... -argN valueN1
tclsh script.tcl arg1 arg2 -arg3 value32 ... -argN valueN2
tclsh script.tcl arg1 arg2 -arg3 value33 ... -argN valueN3

I call it on a windows XP machine, and, on a regular, but
non-deterministic basis (at least, i could't find out any
deterministic pattern so far) at some point in the .bat file, a tlcsh
simply STOPS.

The execution of the script.tcl is about to finish, and just at the
final 'exit' command, the tclsh simply STOPS, i.e it gets stuck and
one can end it only by killing it.
I set a log message in script.tcl just before the final 'exit'; this
last log message is printed.

Did anybody make similar experiences with the tclsh and nows why it
may happen and how it can be avoided? :}
Thanks a lot,


Relevant Pages

  • Re: How to make a tcl file to invoke tclsh by default
    ... #!/usr/bin/env tclsh ... The basic interaction on a Unix like system (and many other systems as ... shell has to figure out what to do with it. ... then executes the argument as a command. ...
  • bootable tclsh
    ... linux-kernel which executes the tclsh with a scriptfile on startup. ...
  • Re: running tcl shell interactive with source
    ... Make a bat file for each of the scripts you'd like preloaded ... Make desktop shortcuts to the batch files. ... This uses the fact that tclsh will source %HOMEPATH%\tclshrc.tcl ...
  • bootable tclsh
    ... and executes the tcl-shell 'tclsh'. ... tcl-script an show the output on display, after that you can turn off ...