in reply to
Re: Get the process id, and output of a process, in a threaded environment
in thread Get the process id, and output of a process, in a threaded environment
Yes, the problem is not caused by threads at all as you said. The only reason I mentioned that aspect, is because setting values for %ENV are not picked up on unix machines unless they are set in the main thread. On windows, your code will work as expected with threads, but unix systems will not pick up those environment changes.
Was writing up an example of my own, but the monk above me beat me to it. Love the community :)