I see that on some other mailing-lists, a few people have ran into
this as well. I don't quite have a solution, but in some sense, there
is a work-around.
Using plink.exe (PuTTY's command-line tool), you can send a single
command on the command line, or specify a file that has multiple
commands to run. I found out that sending one command via the command
line to get the same output as I would using expect, within my Tcl
script:
set data [exec {*}[auto_execok plink] -l <username> -pw <password>
somehost.somedomain "<command to send>"]
...properly closes the connection/process when looking at the task
manager. Then, I can do what I please with the output stored in
$data.
I know this may not going to be suitable for everyone, but I do a lot
of automating of network tasks, working with network devices, etc., so
this would be perfect for anyone who does the same (I would think).
Running multiple commands, you just have to have them in a text file
(one command on each line), and use the following syntax:
set data [exec {*}[auto_execok plink] -l <username> -pw <password> -m
<command file> somehost.somedomain]
Just thought that I'd post this in case anyone else is having these
issues, and needs a possible work-around.