Visual Studio 2012 Hang

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Greetings wise and experienced ones. When I try to use TCCLE as part of a Custom Build command in Visual Studio 2012, it runs, but never exits. Consequently, the build never completes. The tasklist shows no TCC processes. This occurs with both 32-bit and 64-bit versions. Doesn't seem to matter how I run it - I've tried directly, front-ending it with a CMD script, and combinations with start /wait. In all cases, msbuild.exe (32-bit) is just hanging out, and once that's killed of course MSDEV finally reports the build complete, but with error. Process Explorer reports it has a handle to a no-longer existant process. I've used TCC for a long long time and never seen this.

Thoughts? Help!
 
#3
I was using /C, though I tried all kinds of things. I finally figured this out. The problem was not TCC, it was GIT. In order to communicate with it's server, GIT requires SSH-AGENT to be run. This process kicks off another copy of itself with a unique port, then exits. So Visual Studio wasn't just waiting for TCC, the root process, to exit, it was waiting for the entire process group, and since TCC launched SSH-AGENT which launched a *persistent* SSH-AGENT, Visual Studio correctly never exited even after TCC did. My fix was to call SSH-AGENT -k to kill spawned SSH-AGENT at the end of the script, and it now works fine. Also, I no longer accumulate discarded SSH-AGENT processes, which is also a plus.