This guest post is by Tarik Soulami, a Principal Development Lead at Microsoft and author of Inside Windows Debugging: A Practical Guide to Debugging and Tracing Strategies in Windows , which is getting very positive reviews on Amazon . Enjoy! Tarik here. When you think of scripts, you don’t usually think of threads, synchronization or deadlocks. However, that was precisely the curious bug I had to investigate a few weeks ago. The script I was trying to write had a simple goal: parse the standard and error outputs from another existing command-line tool (a console application), and write the processed (modified) text to the command prompt. The repro case My console application tool was fairly complex, but I was able to simulate the hang condition even with the following simple program: // more