Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
For my master-thesis I'm writing a C#-application that will run
Tcl-scripts via the code found at http://wiki.tcl.tk/9563
Usually, I'm a linux-guy but the company I work with wants me to use C#.
Tcl version used is 8.5.11, compiled locally from source with debugging
symbols (using Visual Studio 2010)
In one tcl-script, I have a "socket"-command (client-socket, wrapped in
a catch-block) to connect to another server. As long as this command
succeeds, everything is fine. When there is an error (timeout, host
unreachable), a thread is not ended correctly and stays sleeping (see:
http://kripton.kripserver.net/pix/tcl_sleeping_thread.png). When not
calling "Tcl_Exit" before reaching the end of my C#-applications's
main-function, the program will not exit and can't even be stopped by a
The "Line 2211" mentioned at the stack trace is from source file
tclWinSock.c. So the socket waits for messages (from the OS) but won't
get any. Wouldn't be closing the sock on an error be the correct
I tried Tcl_DeleteInterp but it didn't work.
When I use Tcl_Exit, the program terminates correctly but my question is:
Is it known that a sleeping thread remains?
Will there be a new thread for every failed call to "socket"? (Memory leak?)
Is this a bug and should be fixed or desired behavior?